diff --git a/docs/api/README.md b/docs/api/README.md new file mode 100644 index 000000000..c118b4bef --- /dev/null +++ b/docs/api/README.md @@ -0,0 +1,38 @@ +# Intent-driven API +Starting from **Parser API v2**, the API follows an Intent-driven design approach, based on user intents rather than technical mechanics. + +An **Intent** represents a user intention of performing an action that solves a clear use case. + +For example, `Buy five watermelons` is the intent for `Going to the fruit shop, grab five watermelons, go to the counter, pay with cash, put the watermelon in a bag, exit the shop`. + +Base on this principle, we have built an API based on the intents of final users, hiding the complexity of the tasks (do not care about going to the fruit shop, we do that for you) and providing better usability. +We tried to cover most use cases; however, the API accepts new intents adding new intents at any moment. + +## Design + +Intents are wrapped in models. Models are spec-independent but based on AsyncAPI concepts that will always exist regardless of the specification version. + +The upsides of using this approach are: +- Better user experience. Intents are much simple to use and do not force users to know about all spec internals. +- Improves resiliency to breaking changes on the final user code. Most of the time, users will **only** need to upgrade to the latest version of the parser to be up-to-date with the latest spec. + +All Parsers, no matters the language, should follow the Intent-driven Parser API. +This API is versioned so Parser implementations can maintain their compatibility matrix. + +### Models + +Some examples of models are: +- **AsyncAPI** is the root model. Most of the intents are here, so users don't need to navigate through the object hierarchy. +- **Message** represents a message in your message-driven architecture. They can relate to Operations and Channels, but the relationship is not mandatory. +- **Channel** describes a `topic`/`channel` a Message is transmitted over by some Operation. +- **Operation** describes an action rather the Application or the Client performs. It links messages with channels. +- **Server** represents a Server in your message-driven architecture. Clients connect to servers. +- **Info** contains defined information about your Application. +- **Schema** is used for representing [JSON Schema Draft 7](https://json-schema.org/draft-07/json-schema-release-notes.html) objects. +- **Tag** contains metadata. +- **SecurityScheme** represents security specifications for servers. + +## Development +To avoid polluting the API with intents that have no apparent use case or can be replaced by a call to another model, we have defined the following rule: + +Intents at the root model (`AsyncAPI`) **SHOULD** never return properties of other models but instead answer questions, return the model itself or a collection of models. diff --git a/docs/api/generated_v2.md b/docs/api/generated_v2.md new file mode 100644 index 000000000..7e210a6ce --- /dev/null +++ b/docs/api/generated_v2.md @@ -0,0 +1,185 @@ + +## [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) ⇐ Base +* [.version()](#module_@asyncapi/parser+AsyncAPIDocument+version) ⇒ string +* [.hasId()](#module_@asyncapi/parser+AsyncAPIDocument+hasId) ⇒ boolean +* [.id()](#module_@asyncapi/parser+AsyncAPIDocument+id) ⇒ string \| undefined +* [.hasDefaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+hasDefaultContentType) ⇒ boolean +* [.defaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+defaultContentType) ⇒ string \| undefined +* [.info()](#module_@asyncapi/parser+AsyncAPIDocument+info) ⇒ Info +* [.applicationPublishableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishableChannels) ⇒ Array.<Channel> +* [.applicationSubscribableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribableChannels) ⇒ Array.<Channel> +* [.clientPublishableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishableChannels) ⇒ Array.<Channel> +* [.clientSubscribableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribableChannels) ⇒ Array.<Channel> +* [.channels()](#module_@asyncapi/parser+AsyncAPIDocument+channels) ⇒ Array.<Channel> +* [.applicationPublishableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishableMessages) ⇒ Array.<Message> +* [.applicationSubscribableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribableMessages) ⇒ Array.<Message> +* [.clientPublishableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishableMessages) ⇒ Array.<Message> +* [.clientSubscribableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribableMessages) ⇒ Array.<Message> +* [.messages()](#module_@asyncapi/parser+AsyncAPIDocument+messages) ⇒ Array.<Message> +* [.applicationPublishOperations()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishOperations) ⇒ Array.<Operation> +* [.applicationSubscribeOperations()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribeOperations) ⇒ Array.<Operation> +* [.clientPublishOperations()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishOperations) ⇒ Array.<Operation> +* [.clientSubscribeOperations()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribeOperations) ⇒ Array.<Operation> +* [.operations()](#module_@asyncapi/parser+AsyncAPIDocument+operations) ⇒ Array.<Operation> +* [.schemas()](#module_@asyncapi/parser+AsyncAPIDocument+schemas) ⇒ Array.<Schema> +* [.hasServers()](#module_@asyncapi/parser+AsyncAPIDocument+hasServers) ⇒ boolean +* [.servers()](#module_@asyncapi/parser+AsyncAPIDocument+servers) ⇒ Array.<Server> +* [.server()](#module_@asyncapi/parser+AsyncAPIDocument+server) ⇒ Server \| undefined +* [.securitySchemes()](#module_@asyncapi/parser+AsyncAPIDocument+securitySchemes) ⇒ Array.<SecurityScheme> +* [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocument \| undefined +* [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> \| undefined +## [Base](#module_@asyncapi/parser+Base) +* [.json()](#module_@asyncapi/parser+Base+json) ⇒ any +* [.hasExtension()](#module_@asyncapi/parser+Base+hasExtension) ⇒ boolean +* [.extension()](#module_@asyncapi/parser+Base+extension) ⇒ any \| undefined +## [Channel](#module_@asyncapi/parser+Channel) ⇐ Base +* [.operations()](#module_@asyncapi/parser+Channel+operations) ⇒ Array.<Operation> +* [.path()](#module_@asyncapi/parser+Channel+path) ⇒ string +* [.messages()](#module_@asyncapi/parser+Channel+messages) ⇒ Array.<Message> +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Channel+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Channel+binding) ⇒ any \| undefined +* [.hasParameters()](#module_@asyncapi/parser+Channel+hasParameters) ⇒ boolean +* [.parameters()](#module_@asyncapi/parser+Channel+parameters) ⇒ Array.<Schema> \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Channel+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Channel+description) ⇒ string \| undefined +## [Contact](#module_@asyncapi/parser+Contact) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+Contact+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Contact+name) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+Contact+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+Contact+url) ⇒ string \| undefined +* [.hasEmail()](#module_@asyncapi/parser+Contact+hasEmail) ⇒ boolean +* [.email()](#module_@asyncapi/parser+Contact+email) ⇒ string \| undefined +## [CorrelationId](#module_@asyncapi/parser+CorrelationId) ⇐ Base +* [.hasDescription()](#module_@asyncapi/parser+CorrelationId+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+CorrelationId+description) ⇒ string \| undefined +* [.hasLocation()](#module_@asyncapi/parser+CorrelationId+hasLocation) ⇒ boolean +* [.location()](#module_@asyncapi/parser+CorrelationId+location) ⇒ string \| undefined +## [ExternalDocument](#module_@asyncapi/parser+ExternalDocument) ⇐ Base +* [.hasDescription()](#module_@asyncapi/parser+ExternalDocument+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+ExternalDocument+description) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+ExternalDocument+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+ExternalDocument+url) ⇒ string \| undefined +## [Info](#module_@asyncapi/parser+Info) ⇐ Base +* [.title()](#module_@asyncapi/parser+Info+title) ⇒ string +* [.version()](#module_@asyncapi/parser+Info+version) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Info+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Info+description) ⇒ string \| undefined +* [.hasTermsOfService()](#module_@asyncapi/parser+Info+hasTermsOfService) ⇒ boolean +* [.termsOfService()](#module_@asyncapi/parser+Info+termsOfService) ⇒ string \| undefined +* [.hasContact()](#module_@asyncapi/parser+Info+hasContact) ⇒ boolean +* [.contact()](#module_@asyncapi/parser+Info+contact) ⇒ Contact \| undefined +* [.hasLicense()](#module_@asyncapi/parser+Info+hasLicense) ⇒ boolean +* [.license()](#module_@asyncapi/parser+Info+license) ⇒ License \| undefined +## [License](#module_@asyncapi/parser+License) ⇐ Base +* [.name()](#module_@asyncapi/parser+License+name) ⇒ string +* [.hasUrl()](#module_@asyncapi/parser+License+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+License+url) ⇒ string \| undefined +## [Message](#module_@asyncapi/parser+Message) ⇐ Base +* [.uid()](#module_@asyncapi/parser+Message+uid) ⇒ string +* [.payload()](#module_@asyncapi/parser+Message+payload) ⇒ Schema +* [.channels()](#module_@asyncapi/parser+Message+channels) ⇒ Array.<Channel> +* [.operations()](#module_@asyncapi/parser+Message+operations) ⇒ Array.<Operation> +* [.hasName()](#module_@asyncapi/parser+Message+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Message+name) ⇒ string \| undefined +* [.hasSummary()](#module_@asyncapi/parser+Message+hasSummary) ⇒ boolean +* [.summary()](#module_@asyncapi/parser+Message+summary) ⇒ string \| undefined +* [.hasTitle()](#module_@asyncapi/parser+Message+hasTitle) ⇒ boolean +* [.title()](#module_@asyncapi/parser+Message+title) ⇒ string \| undefined +* [.hasHeaders()](#module_@asyncapi/parser+Message+hasHeaders) ⇒ boolean +* [.headers()](#module_@asyncapi/parser+Message+headers) ⇒ Schema \| undefined +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Message+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Message+binding) ⇒ any \| undefined +* [.contentType()](#module_@asyncapi/parser+Message+contentType) ⇒ string +* [.examples()](#module_@asyncapi/parser+Message+examples) ⇒ Map.<string, any> +* [.hasCorrelationId()](#module_@asyncapi/parser+Message+hasCorrelationId) ⇒ boolean +* [.correlationId()](#module_@asyncapi/parser+Message+correlationId) ⇒ CorrelationId \| undefined +* [.hasTags()](#module_@asyncapi/parser+Message+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+Message+tags) ⇒ Array.<Tag> \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Message+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Message+description) ⇒ string \| undefined +## [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) ⇐ Base +* [.authorizationUrl()](#module_@asyncapi/parser+OAuthFlow+authorizationUrl) ⇒ string \| undefined +* [.tokenUrl()](#module_@asyncapi/parser+OAuthFlow+tokenUrl) ⇒ string \| undefined +* [.hasRefreshUrl()](#module_@asyncapi/parser+OAuthFlow+hasRefreshUrl) ⇒ boolean +* [.refreshUrl()](#module_@asyncapi/parser+OAuthFlow+refreshUrl) ⇒ string \| undefined +* [.scopes()](#module_@asyncapi/parser+OAuthFlow+scopes) ⇒ Object.<string, string> \| undefined +## [OAuthFlows](#module_@asyncapi/parser+OAuthFlows) ⇐ Base +* [.hasImplicit()](#module_@asyncapi/parser+OAuthFlows+hasImplicit) ⇒ boolean +* [.implicit()](#module_@asyncapi/parser+OAuthFlows+implicit) ⇒ OAuthFlow \| undefined +* [.hasPassword()](#module_@asyncapi/parser+OAuthFlows+hasPassword) ⇒ boolean +* [.password()](#module_@asyncapi/parser+OAuthFlows+password) ⇒ OAuthFlow \| undefined +* [.hasClientCredentials()](#module_@asyncapi/parser+OAuthFlows+hasClientCredentials) ⇒ boolean +* [.clientCredentials()](#module_@asyncapi/parser+OAuthFlows+clientCredentials) ⇒ OAuthFlow \| undefined +* [.hasAuthorizationCode()](#module_@asyncapi/parser+OAuthFlows+hasAuthorizationCode) ⇒ boolean +* [.authorizationCode()](#module_@asyncapi/parser+OAuthFlows+authorizationCode) ⇒ OAuthFlow \| undefined +## [Operation](#module_@asyncapi/parser+Operation) ⇐ Base +* [.id()](#module_@asyncapi/parser+Operation+id) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Operation+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Operation+description) ⇒ string \| undefined +* [.hasSummary()](#module_@asyncapi/parser+Operation+hasSummary) ⇒ boolean +* [.summary()](#module_@asyncapi/parser+Operation+summary) ⇒ string \| undefined +* [.hasMultipleMessages()](#module_@asyncapi/parser+Operation+hasMultipleMessages) ⇒ boolean +* [.messages()](#module_@asyncapi/parser+Operation+messages) ⇒ Array.<Message> +* [.channels()](#module_@asyncapi/parser+Operation+channels) ⇒ Array.<Channel> +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Operation+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Operation+binding) ⇒ any \| undefined +* [.servers()](#module_@asyncapi/parser+Operation+servers) ⇒ Array.<Server> +* [.server()](#module_@asyncapi/parser+Operation+server) ⇒ Server +* [.isClientSubscribing()](#module_@asyncapi/parser+Operation+isClientSubscribing) ⇒ boolean +* [.isClientPublishing()](#module_@asyncapi/parser+Operation+isClientPublishing) ⇒ boolean +* [.isApplicationSubscribing()](#module_@asyncapi/parser+Operation+isApplicationSubscribing) ⇒ boolean +* [.isApplicationPublishing()](#module_@asyncapi/parser+Operation+isApplicationPublishing) ⇒ boolean +* [.type()](#module_@asyncapi/parser+Operation+type) ⇒ [Types](#Types) +* [.hasExternalDocs()](#module_@asyncapi/parser+Operation+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+Operation+externalDocs) ⇒ ExternalDocument \| undefined +* [.hasTags()](#module_@asyncapi/parser+Operation+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+Operation+tags) ⇒ Array.<Tag> +## [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) ⇐ Base +* [.type()](#module_@asyncapi/parser+SecurityScheme+type) ⇒ [Types](#Types) +* [.name()](#module_@asyncapi/parser+SecurityScheme+name) ⇒ string +* [.in()](#module_@asyncapi/parser+SecurityScheme+in) ⇒ [ApiKeyLocations](#ApiKeyLocations) +* [.hasSchema()](#module_@asyncapi/parser+SecurityScheme+hasSchema) ⇒ boolean +* [.scheme()](#module_@asyncapi/parser+SecurityScheme+scheme) ⇒ string \| undefined +* [.hasBearerFormat()](#module_@asyncapi/parser+SecurityScheme+hasBearerFormat) ⇒ boolean +* [.bearerFormat()](#module_@asyncapi/parser+SecurityScheme+bearerFormat) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+SecurityScheme+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+SecurityScheme+description) ⇒ string +* [.flows()](#module_@asyncapi/parser+SecurityScheme+flows) ⇒ OAuthFlows +* [.openIdConnectUrl()](#module_@asyncapi/parser+SecurityScheme+openIdConnectUrl) ⇒ string +## [ServerSecurity](#module_@asyncapi/parser+ServerSecurity) ⇐ Base +* [.securityScheme()](#module_@asyncapi/parser+ServerSecurity+securityScheme) ⇒ SecurityScheme +* [.values()](#module_@asyncapi/parser+ServerSecurity+values) ⇒ Array.<string> +## [ServerVariable](#module_@asyncapi/parser+ServerVariable) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+ServerVariable+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+ServerVariable+name) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+ServerVariable+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+ServerVariable+description) ⇒ string \| undefined +* [.hasAllowedValues()](#module_@asyncapi/parser+ServerVariable+hasAllowedValues) ⇒ boolean +* [.allowedValues()](#module_@asyncapi/parser+ServerVariable+allowedValues) ⇒ Array.<any> +* [.hasDefaultValue()](#module_@asyncapi/parser+ServerVariable+hasDefaultValue) ⇒ boolean +* [.defaultValue()](#module_@asyncapi/parser+ServerVariable+defaultValue) ⇒ string \| undefined +* [.examples()](#module_@asyncapi/parser+ServerVariable+examples) ⇒ Array.<string> +## [Server](#module_@asyncapi/parser+Server) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+Server+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Server+name) ⇒ string \| undefined +* [.hasProtocol()](#module_@asyncapi/parser+Server+hasProtocol) ⇒ boolean +* [.protocol()](#module_@asyncapi/parser+Server+protocol) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+Server+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+Server+url) ⇒ string \| undefined +* [.operations()](#module_@asyncapi/parser+Server+operations) ⇒ Array.<Operation> +* [.variables()](#module_@asyncapi/parser+Server+variables) ⇒ Array.<ServerVariable> +* [.security()](#module_@asyncapi/parser+Server+security) ⇒ Array.<ServerSecurity> +* [.hasProtocolVersion()](#module_@asyncapi/parser+Server+hasProtocolVersion) ⇒ boolean +* [.protocolVersion()](#module_@asyncapi/parser+Server+protocolVersion) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Server+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Server+description) ⇒ string \| undefined +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Server+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Server+binding) ⇒ any \| undefined +## [Tag](#module_@asyncapi/parser+Tag) ⇐ Base +* [.name()](#module_@asyncapi/parser+Tag+name) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Tag+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Tag+description) ⇒ string \| undefined +* [.hasExternalDocs()](#module_@asyncapi/parser+Tag+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+Tag+externalDocs) ⇒ ExternalDocument \| undefined \ No newline at end of file diff --git a/docs/api/v2.md b/docs/api/v2.md new file mode 100644 index 000000000..aecea04d7 --- /dev/null +++ b/docs/api/v2.md @@ -0,0 +1,144 @@ + +### All models (Base) +- `.hasExtension(key)` : boolean (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) +- `.extension(key)` : any (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) +- `.json()` : string (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) + +### Root - AsyncAPIDocument + +- `AsyncAPIDocument.version()` : string +- `AsyncAPIDocument.hasId()` : boolean +- `AsyncAPIDocument.id()` : string|undefined +- `AsyncAPIDocument.hasDefaultContentType()` : boolean +- `AsyncAPIDocument.defaultContentType()` : string|undefined +- `AsyncAPIDocument.hasExternalDocs()` : boolean +- `AsyncAPIDocument.externalDocs()` : string|undefined +- `AsyncAPIDocument.hasTags()` : boolean +- `AsyncAPIDocument.tags()` : IntentTag|undefined +- `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) +- `AsyncAPIDocument.applicationPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.applicationPublishableMessages()` : Message[] +- `AsyncAPIDocument.applicationPublishOperations()` : Operation[] +- `AsyncAPIDocument.applicationSubscribableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.applicationSubscribableMessages()` : Message[] +- `AsyncAPIDocument.applicationSubscribeOperations()` : Operation[] +- `AsyncAPIDocument.clientPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.clientPublishableMessages()` : Message[] +- `AsyncAPIDocument.clientPublishOperations()` : Operation[] +- `AsyncAPIDocument.clientSubscribableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.clientSubscribableMessages()` : Message[] +- `AsyncAPIDocument.clientSubscribeOperations()` : Operation[] +- `AsyncAPIDocument.messages([])` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.hasChannels()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) +- `AsyncAPIDocument.channels([])` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.operations([])` : Operation[] +- `AsyncAPIDocument.schemas()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.hasServers()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) +- `AsyncAPIDocument.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.info()` : Info +- `AsyncAPIDocument.securitySchemes()` : SecurityScheme[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) + +### Info +- `Info.title()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) +- `Info.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Info.version()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) +- `Info.termsOfService()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L27) + +### Server +- `Server.name()` : string +- `Server.protocol()` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Server.operations()` : Operation[] +- `Server.protocolVersion()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L27) +- `Server.hasDescription()` : boolean +- `Server.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L28) +- `Server.variables()` : ServerVariable[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L37) +- `Server.security()` : ServerSecurity[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L38 and https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L73-L93) +- `Server.binding()` : any + +### ServerVariable +- `ServerVariable.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49) +- `ServerVariable.hasDefaultValue()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.defaultValue()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.hasAllowedValues()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.allowedValues()` : any[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.hasDescription()` : boolean +- `ServerVariable.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.examples()` : string[] + +### ServerSecurity +- `ServerSecurity.hasExtension()` : boolean +- `ServerSecurity.extension()` : any|undefined +- `ServerSecurity.securityScheme()` : SecurityScheme (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `ServerSecurity.values()` : string[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) + + +### SecurityScheme +- `SecurityScheme.type()` : Types (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.in()` : ApiKeyLocations (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.scheme()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.bearerFormat()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.hasDescription()` : boolean +- `SecurityScheme.description()` : string +- `SecurityScheme.flows()` : OauthFlows +- `SecurityScheme.openIdConnectUrl()` : string + +### Operation +- `Operation.id()` : string +- `Operation.summary()` : string +- `Operation.hasDescription()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L69-L71) +- `Operation.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L69-L71) +- `Operation.hasMultipleMessages()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L74) +- `Operation.messages()` : Message[] +- `Operation.channels()` : Channel[] +- `Operation.extension('')` : any +- `Operation.binding('')` : any +- `Operation.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `Operation.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `Operation.isClientSubscribing()` : boolean +- `Operation.isClientPublishing()` : boolean +- `Operation.isApplicationSubscribing()` : boolean +- `Operation.isApplicationPublishing()` : boolean +- `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` +- `Operation.hasExternalDocs()` : boolean +- `Operation.externalDocs()` : ExternalDocumentation +- `Operation.hasTags()` : boolean +- `Operation.tags()` : Tag[] + +### Channel +- `Channel.path()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L26) +- `Channel.messages()` : Message[] +- `Channel.operations()` : Operation[] +- `Channel.hasDescription()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L28) +- `Channel.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.extension('')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Channel.binding('')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Channel.hasParameters()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L34) +- `Channel.parameters()` : ChannelParameter[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961) and https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L34) + +### ChannelParameter +- `ChannelParameter.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L47) +- `ChannelParameter.schema()` : Schema (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L48) + +### Message +- `Message.summary()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L11) +- `Message.hasDescription()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L16) +- `Message.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L18) +- `Message.examples()` : Object[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L65) +- `Message.hasTags()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L38) +- `Message.tags()` : Tag[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L41) +- `Message.headers()` : Schema (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Message.channels()` : Channel[] +- `Message.operations()` : Operation[] +- `Message.binding('')` : any +- `Message.contentType()` : string + + +### Tag +- `Tag.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L52) +- `Tag.hasDescription()` : string +- `Tag.description()` : string +- `Tag.hasExternalDocs()` : boolean +- `Tag.externalDocs` : ExternalDocumentation