Skip to content

Latest commit

 

History

History
3695 lines (2914 loc) · 218 KB

API.md

File metadata and controls

3695 lines (2914 loc) · 218 KB

Modules

@asyncapi/parser

Mixins

MixinBindings

Implements functions to deal with the common Bindings object.

MixinDescription

Implements functions to deal with the description field.

MixinExternalDocs

Implements functions to deal with the ExternalDocs object.

MixinSpecificationExtensions

Implements functions to deal with the SpecificationExtensions object.

MixinTags

Implements functions to deal with the Tags object.

Typedefs

SchemaIteratorCallbackType

The different kind of stages when crawling a schema.

SchemaTypesToIterate

The different types of schemas you can iterate

@asyncapi/parser

@asyncapi/parser.ChannelParameter ⇐ Base

Implements functions to deal with a ChannelParameter object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

channelParameter.location() ⇒ string

Kind: instance method of ChannelParameter

channelParameter.schema() ⇒ Schema

Kind: instance method of ChannelParameter

channelParameter.hasDescription() ⇒ boolean

Kind: instance method of ChannelParameter
Mixes: hasDescription

channelParameter.description() ⇒ string | null

Kind: instance method of ChannelParameter
Mixes: description

channelParameter.hasExtensions() ⇒ boolean

Kind: instance method of ChannelParameter
Mixes: hasExtensions

channelParameter.extensions() ⇒ Object.<string, any>

Kind: instance method of ChannelParameter
Mixes: extensions

channelParameter.extensionKeys() ⇒ Array.<string>

Kind: instance method of ChannelParameter
Mixes: extensionKeys

channelParameter.extKeys() ⇒ Array.<string>

Kind: instance method of ChannelParameter
Mixes: extKeys

channelParameter.hasExtension(key) ⇒ boolean

Kind: instance method of ChannelParameter
Mixes: hasExtension

Param Type Description
key string Extension key.

channelParameter.extension(key) ⇒ any

Kind: instance method of ChannelParameter
Mixes: extension

Param Type Description
key string Extension key.

channelParameter.hasExt(key) ⇒ boolean

Kind: instance method of ChannelParameter
Mixes: hasExt

Param Type Description
key string Extension key.

channelParameter.ext(key) ⇒ any

Kind: instance method of ChannelParameter
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Channel ⇐ Base

Implements functions to deal with a Channel object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinBindings, MixinSpecificationExtensions

channel.parameters() ⇒ Object.<string, ChannelParameter>

Kind: instance method of Channel

channel.parameter(name) ⇒ ChannelParameter

Kind: instance method of Channel

Param Type Description
name string Name of the parameter.

channel.hasParameters() ⇒ boolean

Kind: instance method of Channel

channel.publish() ⇒ PublishOperation

Kind: instance method of Channel

channel.subscribe() ⇒ SubscribeOperation

Kind: instance method of Channel

channel.hasPublish() ⇒ boolean

Kind: instance method of Channel

channel.hasSubscribe() ⇒ boolean

Kind: instance method of Channel

channel.hasDescription() ⇒ boolean

Kind: instance method of Channel
Mixes: hasDescription

channel.description() ⇒ string | null

Kind: instance method of Channel
Mixes: description

channel.hasBindings() ⇒ boolean

Kind: instance method of Channel
Mixes: hasBindings

channel.bindings() ⇒ Object

Kind: instance method of Channel
Mixes: bindings

channel.bindingProtocols() ⇒ Array.<string>

Kind: instance method of Channel
Mixes: bindingProtocols

channel.hasBinding(name) ⇒ boolean

Kind: instance method of Channel
Mixes: hasBinding

Param Type Description
name string Name of the binding.

channel.binding(name) ⇒ Object | null

Kind: instance method of Channel
Mixes: binding

Param Type Description
name string Name of the binding.

channel.hasExtensions() ⇒ boolean

Kind: instance method of Channel
Mixes: hasExtensions

channel.extensions() ⇒ Object.<string, any>

Kind: instance method of Channel
Mixes: extensions

channel.extensionKeys() ⇒ Array.<string>

Kind: instance method of Channel
Mixes: extensionKeys

channel.extKeys() ⇒ Array.<string>

Kind: instance method of Channel
Mixes: extKeys

channel.hasExtension(key) ⇒ boolean

Kind: instance method of Channel
Mixes: hasExtension

Param Type Description
key string Extension key.

channel.extension(key) ⇒ any

Kind: instance method of Channel
Mixes: extension

Param Type Description
key string Extension key.

channel.hasExt(key) ⇒ boolean

Kind: instance method of Channel
Mixes: hasExt

Param Type Description
key string Extension key.

channel.ext(key) ⇒ any

Kind: instance method of Channel
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Components ⇐ Base

Implements functions to deal with a Components object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinSpecificationExtensions

components.messages() ⇒ Object.<string, Message>

Kind: instance method of Components

components.hasMessages() ⇒ boolean

Kind: instance method of Components

components.message(name) ⇒ Message

Kind: instance method of Components

Param Type Description
name string Name of the message.

components.schemas() ⇒ Object.<string, Schema>

Kind: instance method of Components

components.hasSchemas() ⇒ boolean

Kind: instance method of Components

components.schema(name) ⇒ Schema

Kind: instance method of Components

Param Type Description
name string Name of the schema.

components.securitySchemes() ⇒ Object.<string, SecurityScheme>

Kind: instance method of Components

components.hasSecuritySchemes() ⇒ boolean

Kind: instance method of Components

components.securityScheme(name) ⇒ SecurityScheme

Kind: instance method of Components

Param Type Description
name string Name of the security schema.

components.parameters() ⇒ Object.<string, ChannelParameter>

Kind: instance method of Components

components.hasParameters() ⇒ boolean

Kind: instance method of Components

components.parameter(name) ⇒ ChannelParameter

Kind: instance method of Components

Param Type Description
name string Name of the channel parameter.

components.correlationIds() ⇒ Object.<string, CorrelationId>

Kind: instance method of Components

components.hasCorrelationIds() ⇒ boolean

Kind: instance method of Components

components.correlationId(name) ⇒ CorrelationId

Kind: instance method of Components

Param Type Description
name string Name of the correlationId.

components.operationTraits() ⇒ Object.<string, OperationTrait>

Kind: instance method of Components

components.hasOperationTraits() ⇒ boolean

Kind: instance method of Components

components.operationTrait(name) ⇒ OperationTrait

Kind: instance method of Components

Param Type Description
name string Name of the operation trait.

components.messageTraits() ⇒ Object.<string, MessageTrait>

Kind: instance method of Components

components.hasMessageTraits() ⇒ boolean

Kind: instance method of Components

components.messageTrait(name) ⇒ MessageTrait

Kind: instance method of Components

Param Type Description
name string Name of the message trait.

components.hasExtensions() ⇒ boolean

Kind: instance method of Components
Mixes: hasExtensions

components.extensions() ⇒ Object.<string, any>

Kind: instance method of Components
Mixes: extensions

components.extensionKeys() ⇒ Array.<string>

Kind: instance method of Components
Mixes: extensionKeys

components.extKeys() ⇒ Array.<string>

Kind: instance method of Components
Mixes: extKeys

components.hasExtension(key) ⇒ boolean

Kind: instance method of Components
Mixes: hasExtension

Param Type Description
key string Extension key.

components.extension(key) ⇒ any

Kind: instance method of Components
Mixes: extension

Param Type Description
key string Extension key.

components.hasExt(key) ⇒ boolean

Kind: instance method of Components
Mixes: hasExt

Param Type Description
key string Extension key.

components.ext(key) ⇒ any

Kind: instance method of Components
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Contact ⇐ Base

Implements functions to deal with the Contact object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinSpecificationExtensions

contact.name() ⇒ string

Kind: instance method of Contact

contact.url() ⇒ string

Kind: instance method of Contact

contact.email() ⇒ string

Kind: instance method of Contact

contact.hasExtensions() ⇒ boolean

Kind: instance method of Contact
Mixes: hasExtensions

contact.extensions() ⇒ Object.<string, any>

Kind: instance method of Contact
Mixes: extensions

contact.extensionKeys() ⇒ Array.<string>

Kind: instance method of Contact
Mixes: extensionKeys

contact.extKeys() ⇒ Array.<string>

Kind: instance method of Contact
Mixes: extKeys

contact.hasExtension(key) ⇒ boolean

Kind: instance method of Contact
Mixes: hasExtension

Param Type Description
key string Extension key.

contact.extension(key) ⇒ any

Kind: instance method of Contact
Mixes: extension

Param Type Description
key string Extension key.

contact.hasExt(key) ⇒ boolean

Kind: instance method of Contact
Mixes: hasExt

Param Type Description
key string Extension key.

contact.ext(key) ⇒ any

Kind: instance method of Contact
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.CorrelationId ⇐ Base

Implements functions to deal with a CorrelationId object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

correlationId.location() ⇒ string

Kind: instance method of CorrelationId

correlationId.hasDescription() ⇒ boolean

Kind: instance method of CorrelationId
Mixes: hasDescription

correlationId.description() ⇒ string | null

Kind: instance method of CorrelationId
Mixes: description

correlationId.hasExtensions() ⇒ boolean

Kind: instance method of CorrelationId
Mixes: hasExtensions

correlationId.extensions() ⇒ Object.<string, any>

Kind: instance method of CorrelationId
Mixes: extensions

correlationId.extensionKeys() ⇒ Array.<string>

Kind: instance method of CorrelationId
Mixes: extensionKeys

correlationId.extKeys() ⇒ Array.<string>

Kind: instance method of CorrelationId
Mixes: extKeys

correlationId.hasExtension(key) ⇒ boolean

Kind: instance method of CorrelationId
Mixes: hasExtension

Param Type Description
key string Extension key.

correlationId.extension(key) ⇒ any

Kind: instance method of CorrelationId
Mixes: extension

Param Type Description
key string Extension key.

correlationId.hasExt(key) ⇒ boolean

Kind: instance method of CorrelationId
Mixes: hasExt

Param Type Description
key string Extension key.

correlationId.ext(key) ⇒ any

Kind: instance method of CorrelationId
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.ExternalDocs ⇐ Base

Implements functions to deal with an ExternalDocs object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

externalDocs.url() ⇒ string

Kind: instance method of ExternalDocs

externalDocs.hasDescription() ⇒ boolean

Kind: instance method of ExternalDocs
Mixes: hasDescription

externalDocs.description() ⇒ string | null

Kind: instance method of ExternalDocs
Mixes: description

externalDocs.hasExtensions() ⇒ boolean

Kind: instance method of ExternalDocs
Mixes: hasExtensions

externalDocs.extensions() ⇒ Object.<string, any>

Kind: instance method of ExternalDocs
Mixes: extensions

externalDocs.extensionKeys() ⇒ Array.<string>

Kind: instance method of ExternalDocs
Mixes: extensionKeys

externalDocs.extKeys() ⇒ Array.<string>

Kind: instance method of ExternalDocs
Mixes: extKeys

externalDocs.hasExtension(key) ⇒ boolean

Kind: instance method of ExternalDocs
Mixes: hasExtension

Param Type Description
key string Extension key.

externalDocs.extension(key) ⇒ any

Kind: instance method of ExternalDocs
Mixes: extension

Param Type Description
key string Extension key.

externalDocs.hasExt(key) ⇒ boolean

Kind: instance method of ExternalDocs
Mixes: hasExt

Param Type Description
key string Extension key.

externalDocs.ext(key) ⇒ any

Kind: instance method of ExternalDocs
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Info ⇐ Base

Implements functions to deal with the Info object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

info.title() ⇒ string

Kind: instance method of Info

info.version() ⇒ string

Kind: instance method of Info

info.termsOfService() ⇒ string | undefined

Kind: instance method of Info

info.license() ⇒ License

Kind: instance method of Info

info.contact() ⇒ Contact

Kind: instance method of Info

info.hasDescription() ⇒ boolean

Kind: instance method of Info
Mixes: hasDescription

info.description() ⇒ string | null

Kind: instance method of Info
Mixes: description

info.hasExtensions() ⇒ boolean

Kind: instance method of Info
Mixes: hasExtensions

info.extensions() ⇒ Object.<string, any>

Kind: instance method of Info
Mixes: extensions

info.extensionKeys() ⇒ Array.<string>

Kind: instance method of Info
Mixes: extensionKeys

info.extKeys() ⇒ Array.<string>

Kind: instance method of Info
Mixes: extKeys

info.hasExtension(key) ⇒ boolean

Kind: instance method of Info
Mixes: hasExtension

Param Type Description
key string Extension key.

info.extension(key) ⇒ any

Kind: instance method of Info
Mixes: extension

Param Type Description
key string Extension key.

info.hasExt(key) ⇒ boolean

Kind: instance method of Info
Mixes: hasExt

Param Type Description
key string Extension key.

info.ext(key) ⇒ any

Kind: instance method of Info
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.License ⇐ Base

Implements functions to deal with the License object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinSpecificationExtensions

license.name() ⇒ string

Kind: instance method of License

license.url() ⇒ string

Kind: instance method of License

license.hasExtensions() ⇒ boolean

Kind: instance method of License
Mixes: hasExtensions

license.extensions() ⇒ Object.<string, any>

Kind: instance method of License
Mixes: extensions

license.extensionKeys() ⇒ Array.<string>

Kind: instance method of License
Mixes: extensionKeys

license.extKeys() ⇒ Array.<string>

Kind: instance method of License
Mixes: extKeys

license.hasExtension(key) ⇒ boolean

Kind: instance method of License
Mixes: hasExtension

Param Type Description
key string Extension key.

license.extension(key) ⇒ any

Kind: instance method of License
Mixes: extension

Param Type Description
key string Extension key.

license.hasExt(key) ⇒ boolean

Kind: instance method of License
Mixes: hasExt

Param Type Description
key string Extension key.

license.ext(key) ⇒ any

Kind: instance method of License
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.MessageTrait ⇐ MessageTraitable

Implements functions to deal with a MessageTrait object.

Kind: instance class of @asyncapi/parser
Extends: MessageTraitable

@asyncapi/parser.MessageTraitable ⇐ Base

Implements functions to deal with a the common properties that Message and MessageTrait objects have.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions

messageTraitable.headers() ⇒ Schema

Kind: instance method of MessageTraitable

messageTraitable.header(name) ⇒ Schema

Kind: instance method of MessageTraitable

Param Type Description
name string Name of the header.

messageTraitable.correlationId() ⇒ CorrelationId

Kind: instance method of MessageTraitable

messageTraitable.schemaFormat() ⇒ string

Kind: instance method of MessageTraitable

messageTraitable.contentType() ⇒ string

Kind: instance method of MessageTraitable

messageTraitable.name() ⇒ string

Kind: instance method of MessageTraitable

messageTraitable.title() ⇒ string

Kind: instance method of MessageTraitable

messageTraitable.summary() ⇒ string

Kind: instance method of MessageTraitable

messageTraitable.examples() ⇒ Array.<any>

Kind: instance method of MessageTraitable

messageTraitable.hasDescription() ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasDescription

messageTraitable.description() ⇒ string | null

Kind: instance method of MessageTraitable
Mixes: description

messageTraitable.hasTags() ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasTags

messageTraitable.tags() ⇒ Array.<Tag>

Kind: instance method of MessageTraitable
Mixes: tags

messageTraitable.tagNames() ⇒ Array.<string>

Kind: instance method of MessageTraitable
Mixes: tagNames

messageTraitable.hasTag(name) ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasTag

Param Type Description
name string Name of the tag.

messageTraitable.tag(name) ⇒ Tag | null

Kind: instance method of MessageTraitable
Mixes: tag

Param Type Description
name string Name of the tag.

messageTraitable.hasExternalDocs() ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasExternalDocs

messageTraitable.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of MessageTraitable
Mixes: externalDocs

messageTraitable.hasBindings() ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasBindings

messageTraitable.bindings() ⇒ Object

Kind: instance method of MessageTraitable
Mixes: bindings

messageTraitable.bindingProtocols() ⇒ Array.<string>

Kind: instance method of MessageTraitable
Mixes: bindingProtocols

messageTraitable.hasBinding(name) ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasBinding

Param Type Description
name string Name of the binding.

messageTraitable.binding(name) ⇒ Object | null

Kind: instance method of MessageTraitable
Mixes: binding

Param Type Description
name string Name of the binding.

messageTraitable.hasExtensions() ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasExtensions

messageTraitable.extensions() ⇒ Object.<string, any>

Kind: instance method of MessageTraitable
Mixes: extensions

messageTraitable.extensionKeys() ⇒ Array.<string>

Kind: instance method of MessageTraitable
Mixes: extensionKeys

messageTraitable.extKeys() ⇒ Array.<string>

Kind: instance method of MessageTraitable
Mixes: extKeys

messageTraitable.hasExtension(key) ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasExtension

Param Type Description
key string Extension key.

messageTraitable.extension(key) ⇒ any

Kind: instance method of MessageTraitable
Mixes: extension

Param Type Description
key string Extension key.

messageTraitable.hasExt(key) ⇒ boolean

Kind: instance method of MessageTraitable
Mixes: hasExt

Param Type Description
key string Extension key.

messageTraitable.ext(key) ⇒ any

Kind: instance method of MessageTraitable
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Message ⇐ MessageTraitable

Implements functions to deal with a Message object.

Kind: instance class of @asyncapi/parser
Extends: MessageTraitable

message.uid() ⇒ string

Kind: instance method of Message

message.payload() ⇒ Schema

Kind: instance method of Message

message.originalPayload() ⇒ any

Kind: instance method of Message

message.originalSchemaFormat() ⇒ string

Kind: instance method of Message

@asyncapi/parser.OAuthFlow ⇐ Base

Implements functions to deal with a OAuthFlow object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinSpecificationExtensions

oAuthFlow.authorizationUrl() ⇒ string

Kind: instance method of OAuthFlow

oAuthFlow.tokenUrl() ⇒ string

Kind: instance method of OAuthFlow

oAuthFlow.refreshUrl() ⇒ string

Kind: instance method of OAuthFlow

oAuthFlow.scopes() ⇒ Object.<string, string>

Kind: instance method of OAuthFlow

oAuthFlow.hasExtensions() ⇒ boolean

Kind: instance method of OAuthFlow
Mixes: hasExtensions

oAuthFlow.extensions() ⇒ Object.<string, any>

Kind: instance method of OAuthFlow
Mixes: extensions

oAuthFlow.extensionKeys() ⇒ Array.<string>

Kind: instance method of OAuthFlow
Mixes: extensionKeys

oAuthFlow.extKeys() ⇒ Array.<string>

Kind: instance method of OAuthFlow
Mixes: extKeys

oAuthFlow.hasExtension(key) ⇒ boolean

Kind: instance method of OAuthFlow
Mixes: hasExtension

Param Type Description
key string Extension key.

oAuthFlow.extension(key) ⇒ any

Kind: instance method of OAuthFlow
Mixes: extension

Param Type Description
key string Extension key.

oAuthFlow.hasExt(key) ⇒ boolean

Kind: instance method of OAuthFlow
Mixes: hasExt

Param Type Description
key string Extension key.

oAuthFlow.ext(key) ⇒ any

Kind: instance method of OAuthFlow
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.OperationTrait ⇐ OperationTraitable

Implements functions to deal with a OperationTrait object.

Kind: instance class of @asyncapi/parser
Extends: OperationTraitable

@asyncapi/parser.OperationTraitable ⇐ Base

Implements functions to deal with the common properties Operation and OperationTrait object have.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinTags, MixinExternalDocs, MixinBindings, MixinSpecificationExtensions

operationTraitable.id() ⇒ string

Kind: instance method of OperationTraitable

operationTraitable.summary() ⇒ string

Kind: instance method of OperationTraitable

operationTraitable.hasDescription() ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasDescription

operationTraitable.description() ⇒ string | null

Kind: instance method of OperationTraitable
Mixes: description

operationTraitable.hasTags() ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasTags

operationTraitable.tags() ⇒ Array.<Tag>

Kind: instance method of OperationTraitable
Mixes: tags

operationTraitable.tagNames() ⇒ Array.<string>

Kind: instance method of OperationTraitable
Mixes: tagNames

operationTraitable.hasTag(name) ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasTag

Param Type Description
name string Name of the tag.

operationTraitable.tag(name) ⇒ Tag | null

Kind: instance method of OperationTraitable
Mixes: tag

Param Type Description
name string Name of the tag.

operationTraitable.hasExternalDocs() ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasExternalDocs

operationTraitable.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of OperationTraitable
Mixes: externalDocs

operationTraitable.hasBindings() ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasBindings

operationTraitable.bindings() ⇒ Object

Kind: instance method of OperationTraitable
Mixes: bindings

operationTraitable.bindingProtocols() ⇒ Array.<string>

Kind: instance method of OperationTraitable
Mixes: bindingProtocols

operationTraitable.hasBinding(name) ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasBinding

Param Type Description
name string Name of the binding.

operationTraitable.binding(name) ⇒ Object | null

Kind: instance method of OperationTraitable
Mixes: binding

Param Type Description
name string Name of the binding.

operationTraitable.hasExtensions() ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasExtensions

operationTraitable.extensions() ⇒ Object.<string, any>

Kind: instance method of OperationTraitable
Mixes: extensions

operationTraitable.extensionKeys() ⇒ Array.<string>

Kind: instance method of OperationTraitable
Mixes: extensionKeys

operationTraitable.extKeys() ⇒ Array.<string>

Kind: instance method of OperationTraitable
Mixes: extKeys

operationTraitable.hasExtension(key) ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasExtension

Param Type Description
key string Extension key.

operationTraitable.extension(key) ⇒ any

Kind: instance method of OperationTraitable
Mixes: extension

Param Type Description
key string Extension key.

operationTraitable.hasExt(key) ⇒ boolean

Kind: instance method of OperationTraitable
Mixes: hasExt

Param Type Description
key string Extension key.

operationTraitable.ext(key) ⇒ any

Kind: instance method of OperationTraitable
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Operation ⇐ OperationTraitable

Implements functions to deal with an Operation object.

Kind: instance class of @asyncapi/parser
Extends: OperationTraitable

operation.hasMultipleMessages() ⇒ boolean

Kind: instance method of Operation

operation.messages() ⇒ Array.<Message>

Kind: instance method of Operation

operation.message() ⇒ Message

Kind: instance method of Operation

@asyncapi/parser.PublishOperation ⇐ Operation

Implements functions to deal with a PublishOperation object.

Kind: instance class of @asyncapi/parser
Extends: Operation

publishOperation.isPublish() ⇒ boolean

Kind: instance method of PublishOperation

publishOperation.isSubscribe() ⇒ boolean

Kind: instance method of PublishOperation

publishOperation.kind() ⇒ string

Kind: instance method of PublishOperation

@asyncapi/parser.Schema ⇐ Base

Implements functions to deal with a Schema object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinExternalDocs, MixinSpecificationExtensions

schema.uid() ⇒ string

Kind: instance method of Schema

schema.$id() ⇒ string

Kind: instance method of Schema

schema.multipleOf() ⇒ number

Kind: instance method of Schema

schema.maximum() ⇒ number

Kind: instance method of Schema

schema.exclusiveMaximum() ⇒ number

Kind: instance method of Schema

schema.minimum() ⇒ number

Kind: instance method of Schema

schema.exclusiveMinimum() ⇒ number

Kind: instance method of Schema

schema.maxLength() ⇒ number

Kind: instance method of Schema

schema.minLength() ⇒ number

Kind: instance method of Schema

schema.pattern() ⇒ string

Kind: instance method of Schema

schema.maxItems() ⇒ number

Kind: instance method of Schema

schema.minItems() ⇒ number

Kind: instance method of Schema

schema.uniqueItems() ⇒ boolean

Kind: instance method of Schema

schema.maxProperties() ⇒ number

Kind: instance method of Schema

schema.minProperties() ⇒ number

Kind: instance method of Schema

schema.required() ⇒ Array.<string>

Kind: instance method of Schema

schema.enum() ⇒ Array.<any>

Kind: instance method of Schema

schema.type() ⇒ string | Array.<string>

Kind: instance method of Schema

schema.allOf() ⇒ Array.<Schema>

Kind: instance method of Schema

schema.oneOf() ⇒ Array.<Schema>

Kind: instance method of Schema

schema.anyOf() ⇒ Array.<Schema>

Kind: instance method of Schema

schema.not() ⇒ Schema

Kind: instance method of Schema

schema.items() ⇒ Schema | Array.<Schema>

Kind: instance method of Schema

schema.properties() ⇒ Object.<string, Schema>

Kind: instance method of Schema

schema.property(name) ⇒ Schema

Kind: instance method of Schema

Param Type Description
name string Name of the property.

schema.additionalProperties() ⇒ boolean | Schema

Kind: instance method of Schema

schema.additionalItems() ⇒ Schema

Kind: instance method of Schema

schema.patternProperties() ⇒ Object.<string, Schema>

Kind: instance method of Schema

schema.const() ⇒ any

Kind: instance method of Schema

schema.contains() ⇒ Schema

Kind: instance method of Schema

schema.dependencies() ⇒ Object.<string, (Schema|Array.<string>)>

Kind: instance method of Schema

schema.propertyNames() ⇒ Schema

Kind: instance method of Schema

schema.if() ⇒ Schema

Kind: instance method of Schema

schema.then() ⇒ Schema

Kind: instance method of Schema

schema.else() ⇒ Schema

Kind: instance method of Schema

schema.format() ⇒ string

Kind: instance method of Schema

schema.contentEncoding() ⇒ string

Kind: instance method of Schema

schema.contentMediaType() ⇒ string

Kind: instance method of Schema

schema.definitions() ⇒ Object.<string, Schema>

Kind: instance method of Schema

schema.title() ⇒ string

Kind: instance method of Schema

schema.default() ⇒ any

Kind: instance method of Schema

schema.deprecated() ⇒ boolean

Kind: instance method of Schema

schema.discriminator() ⇒ string

Kind: instance method of Schema

schema.readOnly() ⇒ boolean

Kind: instance method of Schema

schema.writeOnly() ⇒ boolean

Kind: instance method of Schema

schema.examples() ⇒ Array.<any>

Kind: instance method of Schema

schema.isCircular() ⇒ boolean

Kind: instance method of Schema

schema.hasCircularProps() ⇒ boolean

Kind: instance method of Schema

schema.circularProps() ⇒ Array.<string>

Kind: instance method of Schema

schema.hasDescription() ⇒ boolean

Kind: instance method of Schema
Mixes: hasDescription

schema.description() ⇒ string | null

Kind: instance method of Schema
Mixes: description

schema.hasExternalDocs() ⇒ boolean

Kind: instance method of Schema
Mixes: hasExternalDocs

schema.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of Schema
Mixes: externalDocs

schema.hasExtensions() ⇒ boolean

Kind: instance method of Schema
Mixes: hasExtensions

schema.extensions() ⇒ Object.<string, any>

Kind: instance method of Schema
Mixes: extensions

schema.extensionKeys() ⇒ Array.<string>

Kind: instance method of Schema
Mixes: extensionKeys

schema.extKeys() ⇒ Array.<string>

Kind: instance method of Schema
Mixes: extKeys

schema.hasExtension(key) ⇒ boolean

Kind: instance method of Schema
Mixes: hasExtension

Param Type Description
key string Extension key.

schema.extension(key) ⇒ any

Kind: instance method of Schema
Mixes: extension

Param Type Description
key string Extension key.

schema.hasExt(key) ⇒ boolean

Kind: instance method of Schema
Mixes: hasExt

Param Type Description
key string Extension key.

schema.ext(key) ⇒ any

Kind: instance method of Schema
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.SecurityScheme ⇐ Base

Implements functions to deal with a SecurityScheme object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

securityScheme.type() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.name() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.in() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.scheme() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.bearerFormat() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.openIdConnectUrl() ⇒ string

Kind: instance method of SecurityScheme

securityScheme.flows() ⇒ Object.<string, OAuthFlow>

Kind: instance method of SecurityScheme

securityScheme.hasDescription() ⇒ boolean

Kind: instance method of SecurityScheme
Mixes: hasDescription

securityScheme.description() ⇒ string | null

Kind: instance method of SecurityScheme
Mixes: description

securityScheme.hasExtensions() ⇒ boolean

Kind: instance method of SecurityScheme
Mixes: hasExtensions

securityScheme.extensions() ⇒ Object.<string, any>

Kind: instance method of SecurityScheme
Mixes: extensions

securityScheme.extensionKeys() ⇒ Array.<string>

Kind: instance method of SecurityScheme
Mixes: extensionKeys

securityScheme.extKeys() ⇒ Array.<string>

Kind: instance method of SecurityScheme
Mixes: extKeys

securityScheme.hasExtension(key) ⇒ boolean

Kind: instance method of SecurityScheme
Mixes: hasExtension

Param Type Description
key string Extension key.

securityScheme.extension(key) ⇒ any

Kind: instance method of SecurityScheme
Mixes: extension

Param Type Description
key string Extension key.

securityScheme.hasExt(key) ⇒ boolean

Kind: instance method of SecurityScheme
Mixes: hasExt

Param Type Description
key string Extension key.

securityScheme.ext(key) ⇒ any

Kind: instance method of SecurityScheme
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.ServerSecurityRequirement ⇐ Base

Implements functions to deal with a ServerSecurityRequirement object.

Kind: instance class of @asyncapi/parser
Extends: Base

@asyncapi/parser.ServerVariable ⇐ Base

Implements functions to deal with a ServerVariable object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinSpecificationExtensions

serverVariable.allowedValues() ⇒ Array.<any>

Kind: instance method of ServerVariable

serverVariable.allows(name) ⇒ boolean

Kind: instance method of ServerVariable

Param Type Description
name string Name of the variable.

serverVariable.hasAllowedValues() ⇒ boolean

Kind: instance method of ServerVariable

serverVariable.defaultValue() ⇒ string

Kind: instance method of ServerVariable

serverVariable.hasDefaultValue() ⇒ boolean

Kind: instance method of ServerVariable

serverVariable.examples() ⇒ Array.<string>

Kind: instance method of ServerVariable

serverVariable.hasDescription() ⇒ boolean

Kind: instance method of ServerVariable
Mixes: hasDescription

serverVariable.description() ⇒ string | null

Kind: instance method of ServerVariable
Mixes: description

serverVariable.hasExtensions() ⇒ boolean

Kind: instance method of ServerVariable
Mixes: hasExtensions

serverVariable.extensions() ⇒ Object.<string, any>

Kind: instance method of ServerVariable
Mixes: extensions

serverVariable.extensionKeys() ⇒ Array.<string>

Kind: instance method of ServerVariable
Mixes: extensionKeys

serverVariable.extKeys() ⇒ Array.<string>

Kind: instance method of ServerVariable
Mixes: extKeys

serverVariable.hasExtension(key) ⇒ boolean

Kind: instance method of ServerVariable
Mixes: hasExtension

Param Type Description
key string Extension key.

serverVariable.extension(key) ⇒ any

Kind: instance method of ServerVariable
Mixes: extension

Param Type Description
key string Extension key.

serverVariable.hasExt(key) ⇒ boolean

Kind: instance method of ServerVariable
Mixes: hasExt

Param Type Description
key string Extension key.

serverVariable.ext(key) ⇒ any

Kind: instance method of ServerVariable
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.Server ⇐ Base

Implements functions to deal with a Server object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinBindings, MixinSpecificationExtensions

server.url() ⇒ string

Kind: instance method of Server

server.protocol() ⇒ string

Kind: instance method of Server

server.protocolVersion() ⇒ string

Kind: instance method of Server

server.variables() ⇒ Object.<string, ServerVariable>

Kind: instance method of Server

server.variable(name) ⇒ ServerVariable

Kind: instance method of Server

Param Type Description
name string Name of the server variable.

server.hasVariables() ⇒ boolean

Kind: instance method of Server

server.security() ⇒ Array.<ServerSecurityRequirement>

Kind: instance method of Server

server.hasDescription() ⇒ boolean

Kind: instance method of Server
Mixes: hasDescription

server.description() ⇒ string | null

Kind: instance method of Server
Mixes: description

server.hasBindings() ⇒ boolean

Kind: instance method of Server
Mixes: hasBindings

server.bindings() ⇒ Object

Kind: instance method of Server
Mixes: bindings

server.bindingProtocols() ⇒ Array.<string>

Kind: instance method of Server
Mixes: bindingProtocols

server.hasBinding(name) ⇒ boolean

Kind: instance method of Server
Mixes: hasBinding

Param Type Description
name string Name of the binding.

server.binding(name) ⇒ Object | null

Kind: instance method of Server
Mixes: binding

Param Type Description
name string Name of the binding.

server.hasExtensions() ⇒ boolean

Kind: instance method of Server
Mixes: hasExtensions

server.extensions() ⇒ Object.<string, any>

Kind: instance method of Server
Mixes: extensions

server.extensionKeys() ⇒ Array.<string>

Kind: instance method of Server
Mixes: extensionKeys

server.extKeys() ⇒ Array.<string>

Kind: instance method of Server
Mixes: extKeys

server.hasExtension(key) ⇒ boolean

Kind: instance method of Server
Mixes: hasExtension

Param Type Description
key string Extension key.

server.extension(key) ⇒ any

Kind: instance method of Server
Mixes: extension

Param Type Description
key string Extension key.

server.hasExt(key) ⇒ boolean

Kind: instance method of Server
Mixes: hasExt

Param Type Description
key string Extension key.

server.ext(key) ⇒ any

Kind: instance method of Server
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.SubscribeOperation ⇐ Operation

Implements functions to deal with a SubscribeOperation object.

Kind: instance class of @asyncapi/parser
Extends: Operation

subscribeOperation.isPublish() ⇒ boolean

Kind: instance method of SubscribeOperation

subscribeOperation.isSubscribe() ⇒ boolean

Kind: instance method of SubscribeOperation

subscribeOperation.kind() ⇒ string

Kind: instance method of SubscribeOperation

@asyncapi/parser.Tag ⇐ Base

Implements functions to deal with a Tag object.

Kind: instance class of @asyncapi/parser
Extends: Base
Mixes: MixinDescription, MixinExternalDocs, MixinSpecificationExtensions

tag.name() ⇒ string

Kind: instance method of Tag

tag.hasDescription() ⇒ boolean

Kind: instance method of Tag
Mixes: hasDescription

tag.description() ⇒ string | null

Kind: instance method of Tag
Mixes: description

tag.hasExternalDocs() ⇒ boolean

Kind: instance method of Tag
Mixes: hasExternalDocs

tag.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of Tag
Mixes: externalDocs

tag.hasExtensions() ⇒ boolean

Kind: instance method of Tag
Mixes: hasExtensions

tag.extensions() ⇒ Object.<string, any>

Kind: instance method of Tag
Mixes: extensions

tag.extensionKeys() ⇒ Array.<string>

Kind: instance method of Tag
Mixes: extensionKeys

tag.extKeys() ⇒ Array.<string>

Kind: instance method of Tag
Mixes: extKeys

tag.hasExtension(key) ⇒ boolean

Kind: instance method of Tag
Mixes: hasExtension

Param Type Description
key string Extension key.

tag.extension(key) ⇒ any

Kind: instance method of Tag
Mixes: extension

Param Type Description
key string Extension key.

tag.hasExt(key) ⇒ boolean

Kind: instance method of Tag
Mixes: hasExt

Param Type Description
key string Extension key.

tag.ext(key) ⇒ any

Kind: instance method of Tag
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser.TraverseSchemas ⇒ boolean

Callback used when crawling a schema.

Kind: static typedef of @asyncapi/parser
Returns: boolean - should the crawler continue crawling the schema?

Param Type Description
schema Schema which is being crawled
propName String if the schema is from a property get the name of such
callbackType SchemaIteratorCallbackType is the schema a new one or is the crawler finishing one.

@asyncapi/parser~ParserError ⇐ Error

Represents an error while trying to parse an AsyncAPI document.

Kind: inner class of @asyncapi/parser
Extends: Error

new ParserError(definition)

Instantiates an error

Param Type Description
definition Object
definition.type String The type of the error.
definition.title String The message of the error.
[definition.detail] String A string containing more detailed information about the error.
[definition.parsedJSON] Object The resulting JSON after YAML transformation. Or the JSON object if the this was the initial format.
[definition.validationErrors] Array.<Object> The errors resulting from the validation. For more information, see https://www.npmjs.com/package/better-ajv-errors.
definition.validationErrors.title String A validation error message.
definition.validationErrors.jsonPointer String The path to the field that contains the error. Uses JSON Pointer format.
definition.validationErrors.startLine Number The line where the error starts in the AsyncAPI document.
definition.validationErrors.startColumn Number The column where the error starts in the AsyncAPI document.
definition.validationErrors.startOffset Number The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document.
definition.validationErrors.endLine Number The line where the error ends in the AsyncAPI document.
definition.validationErrors.endColumn Number The column where the error ends in the AsyncAPI document.
definition.validationErrors.endOffset Number The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document.
[definition.location] Object Error location details after trying to parse an invalid JSON or YAML document.
definition.location.startLine Number The line of the YAML/JSON document where the error starts.
definition.location.startColumn Number The column of the YAML/JSON document where the error starts.
definition.location.startOffset Number The offset (starting from the beginning of the document) where the error starts in the YAML/JSON AsyncAPI document.
[definition.refs] Array.<Object> Error details after trying to resolve $ref's.
definition.refs.title String A validation error message.
definition.refs.jsonPointer String The path to the field that contains the error. Uses JSON Pointer format.
definition.refs.startLine Number The line where the error starts in the AsyncAPI document.
definition.refs.startColumn Number The column where the error starts in the AsyncAPI document.
definition.refs.startOffset Number The offset (starting from the beginning of the document) where the error starts in the AsyncAPI document.
definition.refs.endLine Number The line where the error ends in the AsyncAPI document.
definition.refs.endColumn Number The column where the error ends in the AsyncAPI document.
definition.refs.endOffset Number The offset (starting from the beginning of the document) where the error ends in the AsyncAPI document.

parserError.toJS()

Returns a JS object representation of the error.

Kind: instance method of ParserError

@asyncapi/parser~AsyncAPIDocument ⇐ Base

Implements functions to deal with the AsyncAPI document.

Kind: inner class of @asyncapi/parser
Extends: Base
Mixes: MixinTags, MixinExternalDocs, MixinSpecificationExtensions

asyncAPIDocument.version() ⇒ string

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.info() ⇒ Info

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.id() ⇒ string

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.hasServers() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.servers() ⇒ Object.<string, Server>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.serverNames() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.server(name) ⇒ Server

Kind: instance method of AsyncAPIDocument

Param Type Description
name string Name of the server.

asyncAPIDocument.hasDefaultContentType() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.defaultContentType() ⇒ string | null

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.hasChannels() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.channels() ⇒ Object.<string, Channel>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.channelNames() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.channel(name) ⇒ Channel

Kind: instance method of AsyncAPIDocument

Param Type Description
name string Name of the channel.

asyncAPIDocument.hasComponents() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.components() ⇒ Components

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.hasMessages() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.allMessages() ⇒ Map.<string, Message>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.allSchemas() ⇒ Map.<string, Schema>

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.hasCircular() ⇒ boolean

Kind: instance method of AsyncAPIDocument

asyncAPIDocument.traverseSchemas(callback, schemaTypesToIterate)

Traverse schemas in the document and select which types of schemas to include. By default all schemas are iterated

Kind: instance method of AsyncAPIDocument

Param Type
callback TraverseSchemas
schemaTypesToIterate Array.<SchemaTypesToIterate>

asyncAPIDocument.hasTags() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasTags

asyncAPIDocument.tags() ⇒ Array.<Tag>

Kind: instance method of AsyncAPIDocument
Mixes: tags

asyncAPIDocument.tagNames() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: tagNames

asyncAPIDocument.hasTag(name) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasTag

Param Type Description
name string Name of the tag.

asyncAPIDocument.tag(name) ⇒ Tag | null

Kind: instance method of AsyncAPIDocument
Mixes: tag

Param Type Description
name string Name of the tag.

asyncAPIDocument.hasExternalDocs() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExternalDocs

asyncAPIDocument.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of AsyncAPIDocument
Mixes: externalDocs

asyncAPIDocument.hasExtensions() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExtensions

asyncAPIDocument.extensions() ⇒ Object.<string, any>

Kind: instance method of AsyncAPIDocument
Mixes: extensions

asyncAPIDocument.extensionKeys() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: extensionKeys

asyncAPIDocument.extKeys() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: extKeys

asyncAPIDocument.hasExtension(key) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExtension

Param Type Description
key string Extension key.

asyncAPIDocument.extension(key) ⇒ any

Kind: instance method of AsyncAPIDocument
Mixes: extension

Param Type Description
key string Extension key.

asyncAPIDocument.hasExt(key) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExt

Param Type Description
key string Extension key.

asyncAPIDocument.ext(key) ⇒ any

Kind: instance method of AsyncAPIDocument
Mixes: ext

Param Type Description
key string Extension key.

asyncAPIDocument.hasTags() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasTags

asyncAPIDocument.tags() ⇒ Array.<Tag>

Kind: instance method of AsyncAPIDocument
Mixes: tags

asyncAPIDocument.tagNames() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: tagNames

asyncAPIDocument.hasTag(name) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasTag

Param Type Description
name string Name of the tag.

asyncAPIDocument.tag(name) ⇒ Tag | null

Kind: instance method of AsyncAPIDocument
Mixes: tag

Param Type Description
name string Name of the tag.

asyncAPIDocument.hasExternalDocs() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExternalDocs

asyncAPIDocument.externalDocs() ⇒ ExternalDocs | null

Kind: instance method of AsyncAPIDocument
Mixes: externalDocs

asyncAPIDocument.hasExtensions() ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExtensions

asyncAPIDocument.extensions() ⇒ Object.<string, any>

Kind: instance method of AsyncAPIDocument
Mixes: extensions

asyncAPIDocument.extensionKeys() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: extensionKeys

asyncAPIDocument.extKeys() ⇒ Array.<string>

Kind: instance method of AsyncAPIDocument
Mixes: extKeys

asyncAPIDocument.hasExtension(key) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExtension

Param Type Description
key string Extension key.

asyncAPIDocument.extension(key) ⇒ any

Kind: instance method of AsyncAPIDocument
Mixes: extension

Param Type Description
key string Extension key.

asyncAPIDocument.hasExt(key) ⇒ boolean

Kind: instance method of AsyncAPIDocument
Mixes: hasExt

Param Type Description
key string Extension key.

asyncAPIDocument.ext(key) ⇒ any

Kind: instance method of AsyncAPIDocument
Mixes: ext

Param Type Description
key string Extension key.

@asyncapi/parser~Base

Implements common functionality for all the models.

Kind: inner class of @asyncapi/parser

base.json() ⇒ any

Kind: instance method of Base

@asyncapi/parser~parse(asyncapiYAMLorJSON, [options]) ⇒ Promise.<AsyncAPIDocument>

Parses and validate an AsyncAPI document from YAML or JSON.

Kind: inner method of @asyncapi/parser
Returns: Promise.<AsyncAPIDocument> - The parsed AsyncAPI document.

Param Type Default Description
asyncapiYAMLorJSON String An AsyncAPI document in JSON or YAML format.
[options] Object Configuration options.
[options.path] String Path to the AsyncAPI document. It will be used to resolve relative references. Defaults to current working dir.
[options.parse] Object Options object to pass to json-schema-ref-parser.
[options.resolve] Object Options object to pass to json-schema-ref-parser.
[options.applyTraits] Object true Whether to resolve and apply traits or not.

@asyncapi/parser~parseFromUrl(url, [fetchOptions], [options]) ⇒ Promise.<AsyncAPIDocument>

Fetches an AsyncAPI document from the given URL and passes its content to the parse method.

Kind: inner method of @asyncapi/parser
Returns: Promise.<AsyncAPIDocument> - The parsed AsyncAPI document.

Param Type Description
url String URL where the AsyncAPI document is located.
[fetchOptions] Object Configuration to pass to the fetch call.
[options] Object Configuration to pass to the module:Parser#parse method.

@asyncapi/parser~registerSchemaParser(parserModule)

Registers a new schema parser. Schema parsers are in charge of parsing and transforming payloads to AsyncAPI Schema format.

Kind: inner method of @asyncapi/parser

Param Type Description
parserModule Object The schema parser module containing parse() and getMimeTypes() functions.

MixinBindings

Implements functions to deal with the common Bindings object.

Kind: global mixin

MixinBindings.hasBindings() ⇒ boolean

Kind: static method of MixinBindings

MixinBindings.bindings() ⇒ Object

Kind: static method of MixinBindings

MixinBindings.bindingProtocols() ⇒ Array.<string>

Kind: static method of MixinBindings

MixinBindings.hasBinding(name) ⇒ boolean

Kind: static method of MixinBindings

Param Type Description
name string Name of the binding.

MixinBindings.binding(name) ⇒ Object | null

Kind: static method of MixinBindings

Param Type Description
name string Name of the binding.

MixinDescription

Implements functions to deal with the description field.

Kind: global mixin

MixinDescription.hasDescription() ⇒ boolean

Kind: static method of MixinDescription

MixinDescription.description() ⇒ string | null

Kind: static method of MixinDescription

MixinExternalDocs

Implements functions to deal with the ExternalDocs object.

Kind: global mixin

MixinExternalDocs.hasExternalDocs() ⇒ boolean

Kind: static method of MixinExternalDocs

MixinExternalDocs.externalDocs() ⇒ ExternalDocs | null

Kind: static method of MixinExternalDocs

MixinSpecificationExtensions

Implements functions to deal with the SpecificationExtensions object.

Kind: global mixin

MixinSpecificationExtensions.hasExtensions() ⇒ boolean

Kind: static method of MixinSpecificationExtensions

MixinSpecificationExtensions.extensions() ⇒ Object.<string, any>

Kind: static method of MixinSpecificationExtensions

MixinSpecificationExtensions.extensionKeys() ⇒ Array.<string>

Kind: static method of MixinSpecificationExtensions

MixinSpecificationExtensions.extKeys() ⇒ Array.<string>

Kind: static method of MixinSpecificationExtensions

MixinSpecificationExtensions.hasExtension(key) ⇒ boolean

Kind: static method of MixinSpecificationExtensions

Param Type Description
key string Extension key.

MixinSpecificationExtensions.extension(key) ⇒ any

Kind: static method of MixinSpecificationExtensions

Param Type Description
key string Extension key.

MixinSpecificationExtensions.hasExt(key) ⇒ boolean

Kind: static method of MixinSpecificationExtensions

Param Type Description
key string Extension key.

MixinSpecificationExtensions.ext(key) ⇒ any

Kind: static method of MixinSpecificationExtensions

Param Type Description
key string Extension key.

MixinTags

Implements functions to deal with the Tags object.

Kind: global mixin

MixinTags.hasTags() ⇒ boolean

Kind: static method of MixinTags

MixinTags.tags() ⇒ Array.<Tag>

Kind: static method of MixinTags

MixinTags.tagNames() ⇒ Array.<string>

Kind: static method of MixinTags

MixinTags.hasTag(name) ⇒ boolean

Kind: static method of MixinTags

Param Type Description
name string Name of the tag.

MixinTags.tag(name) ⇒ Tag | null

Kind: static method of MixinTags

Param Type Description
name string Name of the tag.

SchemaIteratorCallbackType

The different kind of stages when crawling a schema.

Kind: global typedef
Properties

Name Type Description
NEW_SCHEMA string The crawler just started crawling a schema.
END_SCHEMA string The crawler just finished crawling a schema.

SchemaTypesToIterate

The different types of schemas you can iterate

Kind: global typedef
Properties

Name Type Description
parameters string Crawl all schemas in parameters
payloads string Crawl all schemas in payloads
headers string Crawl all schemas in headers
components string Crawl all schemas in components
objects string Crawl all schemas of type object
arrays string Crawl all schemas of type array
oneOfs string Crawl all schemas in oneOf's
allOfs string Crawl all schemas in allOf's
anyOfs string Crawl all schemas in anyOf's