spec_json_schemas

package module
v2.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

README

npm npm

AsyncAPI

This package provides all the versions of the AsyncAPI schema.

Installation

NodeJS
npm install @asyncapi/specs
Go
go get github.com/asyncapi/spec-json-schemas/v2

Usage

NodeJS

Grab a specific AsyncAPI version:

const asyncapi = require('@asyncapi/specs/schemas/2.0.0');

// Do something with the schema.

Get a list of versions:

const versions = require('@asyncapi/specs');

console.log(versions);
// Outputs:
//
// {
//   '1.0.0': [Object],
//   '1.1.0': [Object]
// }

const asyncapi = versions['1.1.0'];

// Do something with the schema.
Go

Grab a specific AsyncAPI version:

import "github.com/asyncapi/spec_json_schemas/v2"

func Do() {
    schema, err := spec_json_schemas.Get("1.1.0")
    if err != nil {
        panic(err)
    }

    // Do something with the schema
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(version string) ([]byte, error)

Get retrieves the Schema for a given version. Nil if not found.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL