diff --git a/README.md b/README.md index 4cac906..5db8702 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # parser-api Global API definition for all AsyncAPI Parser implementations. -The API follows an Intent-driven design approach, based on user intents rather than technical mechanics. +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. +An **Intent** represents a user's 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`. Based on this principle, we have built an API based on the intents of the end-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, we cannot think of every use case, so if you feel like the API is missing an intent, please create a feature request with it. +We tried to cover most use cases; however, we cannot think of every use case, so if you feel the API is missing an intent, please create a feature request with it. Find all Parser API versions and definitions [here](docs). @@ -17,34 +17,36 @@ Find all Parser API versions and definitions [here](docs). 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. +- Better user experience. Intents are simple 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 individual parsers are following the intent API. Even though that the individual parsers maintain an individual release cycle, changes to the intent API will force the individual parsers to update as well. -> Say we release a new spec version and we are forced to create a breaking change and force a major version change for the intent API (say from version 2 -> 3) the individual parsers are then forced to make a major version change as well (say JS parser go from version 1 -> 2). +All individual parsers follow the intent API. Even though the individual parsers maintain an individual release cycle, changes to the intent API will force the individual parsers to update as well. +> Say we release a new spec version, and we are forced to create a breaking change and, therefore, force a major version release for the intent API (say from version 2 -> 3). Then, the individual parsers will be forced to release a major version as well (i.e. parser-go from version 1 -> 2). Each parser will therefore maintain its own compatibility matrix between which specification and intent API versions are supported in which parser version. ### Models -These are the models in the intent API: -- **AsyncAPI** is the root model. Most of the intents are here, so users don't need to navigate through the object hierarchy. +These are the most important models in this API: +- **AsyncAPIDocument** is the root model. Most of the intents are here, so users don't need to navigate through the object hierarchy. +- **Binding** is a mechanism to define protocol-specific information. - **Channel** describes a `topic`/`channel` a Message is transmitted over by some Operation. +- **Components** holds a set of reusable objects for different aspects of the AsyncAPI specification. - **Contact** contains Contact information of the Application or Client API. -- **Correlation Id** specifies an identifier at design time that can used for message tracing and correlation. +- **CorrelationId** specifies an identifier at design time that can be used for message tracing and correlation. - **Info** contains defined information about the Application or Client API. - **License** contains License information of the Application or Client API. - **Message** represents a message in your message-driven architecture. They can relate to Operations and Channels, but the relationship is not mandatory. -- **OauthFlow** holds configuration details for a supported OAuth Flow. -- **OauthFlows** allows configuration of the supported OAuth Flows. +- **OAuthFlow** holds configuration details for a supported OAuth Flow. +- **OAuthFlows** allows configuration of the supported OAuth Flows. - **Operation** describes an action performed by the Application or the Client. It links messages with channels. -- **Schema** is a superset of the [JSON Schema Specification Draft 07](https://json-schema.org/understanding-json-schema/basics.html). See https://www.asyncapi.com/docs/specifications/2.0.0#schemaObject. +- **Schema** is a superset of the [JSON Schema Specification Draft 07](https://json-schema.org/understanding-json-schema/basics.html). See https://www.asyncapi.com/docs/specifications/latest#schemaObject. - **SecurityScheme** represents security specifications for servers. -- **Server** represents a Server in your message-driven architecture. Application or Client always want to connect to some server. +- **Server** represents a Server in your message-driven architecture. Application or Client always wants to connect to some server. - **ServerVariable** represents a Server Variable for server URL template substitution. -- **Tag** contains metadata. +- **Tag** contains metadata ## 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: +To avoid polluting the API with intents that have no clear 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/v1.md b/docs/v1.md index 9748d17..b118380 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -1,391 +1,467 @@ -# AsyncAPI Parser API v1.0.0-alpha.3 +# AsyncAPI Parser API v1.0.0-alpha.4 ## AsyncAPIDocument -- channels() : `Channels` -- defaultContentType() : `string` | `undefined` -- extensions : `Extensions` -- hasDefaultContentType() : `boolean` -- info() : `Info` -- messages() : `Messages` -- operations() : `Operations` -- schemas() : `Schemas` -- securitySchemes() : `SecuritySchemes` -- servers() : `Servers` -- version() : `string` +- version(): `string` +- info(): `Info` +- hasDefaultContentType(): `boolean` +- defaultContentType(): `string` | `undefined` +- servers(): `Servers` +- channels(): `Channels` +- operations(): `Operations` +- messages(): `Messages` +- schemas(): `Schemas` +- securitySchemes(): `SecuritySchemes` +- allServers(): `Servers` +- allChannels(): `Channels` +- allOperations(): `Operations` +- allMessages(): `Messages` +- allSchemas(): `Schemas` +- components(): `Components` +- extensions(): `Extensions` ## Binding -- protocol() : `string` -- version() : `string` -- value() : `any` +- protocol(): `string` +- version(): `string` +- value(): `any` ## Bindings -- all() : `Binding[]` -- get(id: `string`) : `Binding` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - -## Channels -- all() : `Channel[]` -- filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` -- filterBySend() : `Channel[]` -- filterByReceive() : `Channel[]` -- get(id: `string`) : `Channel` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `Binding[]` +- isEmpty(): `boolean` +- filterBy(filter: `(binding: Binding) => boolean`): `Binding[]` +- get(id: `string`): `Binding` | `undefined` +- has(id: `string`): `boolean` +- extensions(): `Extensions` ## Channel -- bindings() : `Bindings` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- hasDescription() : `boolean` -- messages() : `Messages` -- operations() : `Operations` -- parameters() : `ChannelParameters` -- servers() : `Servers` +- id(): `string` +- address(): `string` +- servers(): `Servers` +- operations(): `Operations` +- messages(): `Messages` +- parameters(): `ChannelParameters` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- bindings(): `Bindings` +- extensions(): `Extensions` + +## Channels +- all(): `Channel[]` +- isEmpty(): `boolean` +- filterBy(filter: `(channel: Channel) => boolean`): `Channel[]` +- filterBySend(): `Channel[]` +- filterByReceive(): `Channel[]` +- get(id: `string`): `Channel` | `undefined` +- has(id: `string`): `boolean` ## ChannelParameter -- id() : `string` -- hasDescription() : `boolean` -- description() : `string` | `undefined` +- id(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` - hasSchema(): `boolean` -- schema() : `Schema` | `undefined` -- hasLocation() : `boolean` +- schema(): `Schema` | `undefined` +- hasLocation(): `boolean` - location(): `string` | `undefined` -- extensions() : `Extensions` +- extensions(): `Extensions` ## ChannelParameters -- all() : `ChannelParameter[]` -- get(id: `string`) : `ChannelParameter` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `ChannelParameter[]` +- isEmpty(): `boolean` +- filterBy(filter: `(parameter: ChannelParameter) => boolean`): `ChannelParameter[]` +- get(id: `string`): `ChannelParameter` | `undefined` +- has(id: `string`): `boolean` + +## Components +- servers(): `Servers` +- channels(): `Channels` +- messages(): `Messages` +- operations(): `Operations` +- schemas(): `Schemas` +- channelParameters(): `ChannelParameters` +- serverVariables(): `ServerVariables` +- operationTraits(): `OperationTraits` +- messageTraits(): `MessageTraits` +- correlationIds(): `CorrelationIds` +- securitySchemes(): `SecuritySchemes` +- serverBindings(): `Map` +- channelBindings(): `Map` +- operationBindings(): `Map` +- messageBindings(): `Map` +- isEmpty(): `boolean` ## Contact -- email() : `string` | `undefined` -- extensions() : `Extensions` -- hasEmail() : `boolean` -- hasName() : `boolean` -- hasUrl() : `boolean` -- name() : `string` | `undefined` -- url() : `string` | `undefined` +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasUrl(): `boolean` +- url(): `string` | `undefined` +- hasEmail(): `boolean` +- email(): `string` | `undefined` +- extensions(): `Extensions` ## CorrelationId -- description() : `string` | `undefined` -- extensions() : `Extensions` -- hasDescription() : `boolean` -- hasLocation() : `boolean` -- location() : `string` | `undefined` +- location(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- extensions(): `Extensions` + +## CorrelationIds +- all(): `CorrelationId[]` +- isEmpty(): `boolean` +- filterBy(filter: `(correlationId: CorrelationId) => boolean`): `CorrelationId[]` +- get(id: `string`): `CorrelationId` | `undefined` +- has(id: `string`): `boolean` ## Extension -- id() : `string` -- version() : `string` -- value() : `any` +- id(): `string` +- value(): `any` ## Extensions -- all() : `Extension[]` -- get(id: `string`) : `Extension` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - -## ExternalDocument -- description() : `string` | `undefined` -- extensions() : `Extensions` -- hasDescription() : `boolean` -- hasUrl() : `boolean` -- url() : `string` | `undefined` +- all(): `Extension[]` +- isEmpty(): `boolean` +- filterBy(filter: `(extension: Extension) => boolean`): `Extension[]` +- get(id: `string`): `Extension` | `undefined` +- has(id: `string`): `boolean` + +## ExternalDocumention +- url(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- extensions(): `Extensions` ## Info -- contact() : `Contact | undefined` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` -- hasContact() : `boolean` -- hasDescription() : `boolean` -- hasExternalDocs() : `boolean` -- hasId() : `boolean` -- hasLicense() : `boolean` -- hasTermsOfService() : `boolean` -- id() : `string` | `undefined` -- license() : `License` | `undefined` -- tags() : `Tags` -- termsOfService() : `string` | `undefined` -- title() : `string` -- version() : `string` +- title(): `string` +- version(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- hasId(): `boolean` +- id(): `string` | `undefined` +- hasTermsOfService(): `boolean` +- termsOfService(): `string` | `undefined` +- hasContact(): `boolean` +- contact(): `Contact` | `undefined` +- hasLicense(): `boolean` +- license(): `License` | `undefined` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- tags(): `Tags` +- extensions(): `Extensions` ## License -- extensions() : `Extensions` -- hasUrl() : `boolean` -- name() : `string` -- url() : `string` | `undefined` - -## Messages -- all() : `Message[]` -- filterBy(filter : `(message: Message) => boolean`) : `Message[]` -- filterBySend() : `Message[]` -- filterByReceive() : `Message[]` -- get(id: `string`) : `Message` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- name(): `string` +- hasUrl(): `boolean` +- url(): `string` | `undefined` +- extensions(): `Extensions` ## Message -- bindings() : `Bindings` -- channels() : `Channels` -- contentType() : `string` -- correlationId() : `CorrelationId` | `undefined` -- description() : `string` | `undefined` -- examples() : `Map[string, any][]` -- extensions() : `Extensions` -- hasCorrelationId() : `boolean` -- hasDescription() : `boolean` -- hasHeaders() : `boolean` -- hasKnownSchemaFormat() : `boolean` -- hasName() : `boolean` -- hasSummary() : `boolean` -- hasTitle() : `boolean` -- headers() : `Schema` | `undefined` -- id() : `string` -- name() : `string` | `undefined` -- operations() : `Operations` -- hasPayload() : `boolean` -- payload() : `Schema | any` -- schemaFormat() : `string` -- servers() : `Servers` -- summary() : `string` | `undefined` -- tags() : `Tags` -- title() : `string` | `undefined` +- id(): `string` +- schemaFormat(): `string` +- hasMessageId(): `boolean` +- messageId(): `string` | `undefined` +- hasCorrelationId(): `boolean` +- correlationId(): `CorrelationId` | `undefined` +- hasContentType(): `boolean` +- contentType(): `string` | `undefined` +- hasPayload(): `boolean` +- payload(): `Schema` | `undefined` +- hasHeaders(): `boolean` +- headers(): `Schema` | `undefined` +- hasTitle(): `boolean` +- title(): `string` | `undefined` +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- examples(): `MessageExamples` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- tags(): `Tags` +- servers(): `Servers` +- channels(): `Channels` +- operations(): `Operations` - traits(): `MessageTraits` +- bindings(): `Bindings` +- extensions(): `Extensions` -## MessageTraits -- all() : `MessageTrait[]` -- get(id: `string`) : `MessageTrait` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +## Messages +- all(): `Message[]` +- isEmpty(): `boolean` +- filterBy(filter: `(message: Message) => boolean`): `Message[]` +- filterBySend(): `Message[]` +- filterByReceive(): `Message[]` +- get(id: `string`): `Message` | `undefined` +- has(id: `string`): `boolean` + +## MessageExample +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- headers(): `Map` | `undefined` +- payload(): `Map` | `undefined` +- extensions(): `Extensions` + +## MessageExamples +- all(): `MessageExample[]` +- isEmpty(): `boolean` +- filterBy(filter: `(messageExample: MessageExample) => boolean`): `MessageExample[]` +- get(name: `string`): `MessageExample` | `undefined` +- has(name: `string`): `boolean` ## MessageTrait -- bindings() : `Bindings` -- channels() : `Channels` -- contentType() : `string` -- correlationId() : `CorrelationId` | `undefined` -- description() : `string` | `undefined` -- examples() : `Map[string, any][]` -- extensions() : `Extensions` -- hasCorrelationId() : `boolean` -- hasDescription() : `boolean` -- hasHeaders() : `boolean` -- hasKnownSchemaFormat() : `boolean` -- hasName() : `boolean` -- hasSummary() : `boolean` -- hasTitle() : `boolean` -- headers() : `Schema` | `undefined` -- id() : `string` -- name() : `string` | `undefined` -- operations() : `Operations` -- schemaFormat() : `string` -- servers() : `Servers` -- summary() : `string` | `undefined` -- tags() : `Tags` -- title() : `string` | `undefined` +- id(): `string` +- schemaFormat(): `string` +- hasMessageId(): `boolean` +- messageId(): `string` | `undefined` +- hasCorrelationId(): `boolean` +- correlationId(): `CorrelationId` | `undefined` +- hasContentType(): `boolean` +- contentType(): `string` | `undefined` +- hasHeaders(): `boolean` +- headers(): `Schema` | `undefined` +- hasTitle(): `boolean` +- title(): `string` | `undefined` +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- examples(): `MessageExamples` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- tags(): `Tags` +- bindings(): `Bindings` +- extensions(): `Extensions` + +## MessageTraits +- all(): `MessageTrait[]` +- isEmpty(): `boolean` +- filterBy(filter: `(messageTrait: MessageTrait) => boolean`): `MessageTrait[]` +- get(id: `string`): `MessageTrait` | `undefined` +- has(id: `string`): `boolean` ## OAuthFlow -- authorizationUrl() : `string` | `undefined` -- extensions() : `Extensions` -- hasRefreshUrl() : `boolean` -- refreshUrl() : `string` | `undefined` -- scopes() : `Object.<string, string>` | `undefined` -- tokenUrl() : `string` | `undefined` +- hasAuthorizationUrl(): `string` | `undefined` +- authorizationUrl(): `string` | `undefined` +- hasTokenUrl(): `string` | `undefined` +- tokenUrl(): `string` | `undefined` +- hasRefreshUrl(): `boolean` +- refreshUrl(): `string` | `undefined` +- scopes(): `Map` +- extensions(): `Extensions` ## OAuthFlows -- authorizationCode() : `OAuthFlow` | `undefined` -- clientCredentials() : `OAuthFlow` | `undefined` -- extensions() : `Extensions` -- hasAuthorizationCode() : `boolean` -- hasClientCredentials() : `boolean` -- hasImplicit() : `boolean` -- hasPassword() : `boolean` -- implicit() : `OAuthFlow` | `undefined` -- password() : `OAuthFlow` | `undefined` - -## Operations -- all() : `Operation[]` -- filterBy(filter : `(operation: Operation) => boolean`) : `Operation[]` -- filterBySend() : `Operation[]` -- filterByReceive() : `Operation[]` -- get(id: `string`) : `Operation` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - -## Operation -- bindings() : `Bindings` -- channels() : `Channel[]` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` -- hasDescription() : `boolean` -- hasSummary() : `boolean` -- id() : `string` -- messages() : `Message[]` -- servers() : `Server[]` -- summary() : `string` | `undefined` -- tags() : `Tags` -- security() : `Array }>>` +- hasImplicit(): `boolean` +- implicit(): `OAuthFlow` | `undefined` +- hasPassword(): `boolean` +- password(): `OAuthFlow` | `undefined` +- hasClientCredentials(): `boolean` +- clientCredentials(): `OAuthFlow` | `undefined` +- hasAuthorizationCode(): `boolean` +- authorizationCode(): `OAuthFlow` | `undefined` +- extensions(): `Extensions` + +## Operation +- id(): `string` +- action(): `enum{'send', 'receive', 'publish', 'subscribe'}` - isSend(): `boolean` - isReceive(): `boolean` -- action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` -- traits: `OperationTraits` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- security(): `SecurityRequirements[]` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- tags(): `Tags` +- servers(): `Servers` +- channels(): `Channels` +- messages(): `Messages` +- traits(): `OperationTraits` +- bindings(): `Bindings` +- extensions(): `Extensions` -## OperationTraits -- all() : `OperationTrait[]` -- get(id: `string`) : `OperationTrait` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +## Operations +- all(): `Operation[]` +- isEmpty(): `boolean` +- filterBy(filter: `(operation: Operation) => boolean`): `Operation[]` +- filterBySend(): `Operation[]` +- filterByReceive(): `Operation[]` +- get(id: `string`): `Operation` | `undefined` +- has(id: `string`): `boolean` ## OperationTrait -- bindings() : `Bindings` -- channels() : `Channel[]` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` -- hasDescription() : `boolean` -- hasSummary() : `boolean` -- id() : `string` -- servers() : `Server[]` -- summary() : `string` | `undefined` -- tags() : `Tags` -- security() : `Array }>>` -- isSend(): `boolean` -- isReceive(): `boolean` -- action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` +- id(): `string` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- security(): `SecurityRequirements[]` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- tags(): `Tags` +- bindings(): `Bindings` +- extensions(): `Extensions` + +## OperationTraits +- all(): `OperationTrait[]` +- isEmpty(): `boolean` +- filterBy(filter: `(operationTrait: OperationTrait) => boolean`): `OperationTrait[]` +- get(id: `string`): `OperationTrait` | `undefined` +- has(id: `string`): `boolean` ## Schema -- $id() : `string` | `undefined` -- additionalItems : `boolean | Schema` -- additionalProperties : `boolean | Schema` -- allOf : `Schema[]` -- anyOf : `Schema[]` -- const : `any` -- contains : `Schema` -- contentEncoding : `string` | `undefined` -- contentMediaType : `string` | `undefined` -- default : `any` -- definitions : `Map[string, Schema]` -- description : `string` | `undefined` -- dependencies : `Map[string, Schema|string[]]` -- deprecated : `boolean` -- discriminator : `string` | `undefined` -- else : `Schema` -- extensions() : `Extensions` -- enum : `any[]` -- examples : `any[]` -- exclusiveMaximum() : `number` | `undefined` -- exclusiveMinimum : `number` | `undefined` -- format : `string` | `undefined` -- circularSchema : `Schema` -- isBooleanSchema: `boolean` -- if : `Schema` -- isCircular : `boolean` -- items : `Schema | Schema[]` -- maximum() : `number` | `undefined` -- maxItems : `number` | `undefined` -- maxLength : `number` | `undefined` -- maxProperties : `number` | `undefined` -- minimum : `number` | `undefined` -- minItems : `number` | `undefined` -- minLength : `number` | `undefined` -- minProperties : `number` | `undefined` -- multipleOf() : `number` | `undefined` -- not : `Schema` -- oneOf : `Schema[]` -- pattern : `string` | `undefined` -- patternProperties : `Map[string, Schema]` -- properties : `Map[string, Schema]` -- property(name: `string`) : `Schema` -- propertyNames : `Schema` -- readOnly : `boolean` | `undefined` -- required : `string[]` -- then : `Schema` -- title : `string` | `undefined` -- type : `string | string[]` -- uid() : `string` -- uniqueItems : `boolean` | `undefined` -- writeOnly : `boolean` | `undefined` +- $id(): `string` | `undefined` +- additionalItems(): `boolean` | `Schema` +- additionalProperties(): `boolean` | `Schema` +- allOf(): `Schema[]` | `undefined` +- anyOf(): `Schema[]` | `undefined` +- const(): `any` +- contains(): `Schema` | `undefined` +- contentEncoding(): `string` | `undefined` +- contentMediaType(): `string` | `undefined` +- default(): `any` +- definitions(): `Map` | `undefined` +- description(): `string` | `undefined` +- dependencies(): `Map` | `undefined` +- deprecated(): `boolean` +- discriminator(): `string` | `undefined` +- else(): `Schema` | `undefined` +- extensions(): `Extensions` +- enum(): `any[]` | `undefined` +- examples(): `any[]` | `undefined` +- exclusiveMaximum(): `number` | `undefined` +- exclusiveMinimum(): `number` | `undefined` +- format(): `string` | `undefined` +- id(): `string` +- isBooleanSchema(): `boolean` +- if(): `Schema` | `undefined` +- isCircular(): `boolean` +- items(): `Schema` | `Schema[]` | `undefined` +- maximum(): `number` | `undefined` +- maxItems(): `number` | `undefined` +- maxLength(): `number` | `undefined` +- maxProperties(): `number` | `undefined` +- minimum(): `number` | `undefined` +- minItems(): `number` | `undefined` +- minLength(): `number` | `undefined` +- minProperties(): `number` | `undefined` +- multipleOf(): `number` | `undefined` +- not(): `Schema` | `undefined` +- oneOf(): `Schema[]` | `undefined` +- pattern(): `string` | `undefined` +- patternProperties(): `Map` | `undefined` +- properties(): `Map` | `undefined` +- property(name: `string`): `Schema` +- propertyNames(): `Schema` | `undefined` +- readOnly(): `boolean` | `undefined` +- required(): `string[]` | `undefined` +- then(): `Schema` | `undefined` +- title(): `string` | `undefined` +- type(): `string` | `string[]` | `undefined` +- uniqueItems(): `boolean` | `undefined` +- writeOnly(): `boolean` | `undefined` ## Schemas -- all() : `Schema[]` -- get(id: `string`) : `Schema` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `Schema[]` +- isEmpty(): `boolean` +- filterBy(filter: `(schema: Schema) => boolean`): `Schema[]` +- get(id: `string`): `Schema` | `undefined` +- has(id: `string`): `boolean` + +## SecurityRequirement +- scheme(): `SecurityScheme` +- scopes(): `string[]` + +## SecurityRequirements +- all(): `SecurityRequirement[]` +- filterBy(filter: `(securityRequirement: SecurityRequirement) => boolean`): `SecurityRequirement[]` +- get(name: `string`): `SecurityRequirement` | `undefined` +- has(name: `string`): `boolean` +- isEmpty(): `boolean` ## SecurityScheme -- id() : `string` -- bearerFormat() : `string` | `undefined` -- description() : `string` -- extensions() : `Extensions` -- flows() : `OAuthFlows` -- hasBearerFormat() : `boolean` -- hasDescription() : `boolean` -- in() : `enum{'user', 'password', 'query', 'header', 'cookie'}` -- openIdConnectUrl() : `string` -- scheme() : `string` | `undefined` -- scopes() : `string[]` -- type() : `enum{'userPassword', 'apiKey', 'X509', 'symmetricEncryption', 'asymmetricEncryption', 'httpApiKey', 'http', 'oauth2', 'openIdConnect'}` +- id(): `string` +- type(): `enum{'userPassword', 'apiKey', 'X509', 'symmetricEncryption', 'asymmetricEncryption', 'httpApiKey', 'http', 'oauth2', 'openIdConnect', 'plain', 'scramSha256', 'scramSha512', 'gssapi'}` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasIn(): `boolean` +- in(): `enum{'user', 'password', 'query', 'header', 'cookie'}` | `undefined` +- hasScheme(): `boolean` +- scheme(): `string` | `undefined` +- hasBearerFormat(): `boolean` +- bearerFormat(): `string` | `undefined` +- hasFlows(): `boolean` +- flows(): `OAuthFlows` | `undefined` +- hasOpenIdConnectUrl(): `boolean` +- openIdConnectUrl(): `string` | `undefined` +- extensions(): `Extensions` # SecuritySchemes -- all() : `SecurityScheme[]` -- get(id: `string`) : `SecurityScheme` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - -## Servers -- all() : `Server[]` -- filterBy(filter : `(server: Server) => boolean`) : `Server[]` -- filterBySend() : `Server[]` -- filterByReceive() : `Server[]` -- get(id: `string`) : `Server` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `SecurityScheme[]` +- isEmpty(): `boolean` +- filterBy(filter: `(securityScheme: SecurityScheme) => boolean`): `SecurityScheme[]` +- get(id: `string`): `SecurityScheme` | `undefined` +- has(id: `string`): `boolean` ## Server -- bindings() : `Bindings` -- channels() : `Channels` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- hasDescription() : `boolean` -- hasProtocolVersion() : `boolean` -- messages() : `Messages` -- name() : `string` | `undefined` -- operations() : `Operations` -- protocol() : `string` | `undefined` -- protocolVersion() : `string` | `undefined` -- security() : `Array }>>` -- url() : `string` | `undefined` -- variables() : `ServerVariables` +- id(): `string` +- url(): `string` +- protocol(): `string` +- hasProtocolVersion(): `boolean` +- protocolVersion(): `string` | `undefined` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- variables(): `ServerVariables` +- security(): `SecurityRequirements[]` +- channels(): `Channels` +- operations(): `Operations` +- messages(): `Messages` +- tags(): `Tags` +- bindings(): `Bindings` +- extensions(): `Extensions` + +## Servers +- all(): `Server[]` +- isEmpty(): `boolean` +- filterBy(filter: `(server: Server) => boolean`): `Server[]` +- filterBySend(): `Server[]` +- filterByReceive(): `Server[]` +- get(id: `string`): `Server` | `undefined` +- has(id: `string`): `boolean` ## ServerVariable -- allowedValues() : `any[]` -- defaultValue() : `string` | `undefined` -- description() : `string` | `undefined` -- examples() : `string[]` -- extensions() : `Extensions` -- hasAllowedValues() : `boolean` -- hasDefaultValue() : `boolean` -- hasDescription() : `boolean` -- id() : `string` +- id(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- hasDefaultValue(): `boolean` +- defaultValue(): `string` | `undefined` +- hasAllowedValues(): `boolean` +- allowedValues(): `string[]` +- examples(): `string[]` +- extensions(): `Extensions` ## ServerVariables -- all() : `ServerVariable[]` -- get(name: `string`) : `ServerVariable` | `undefined` -- has(name: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `ServerVariable[]` +- isEmpty(): `boolean` +- filterBy(filter: `(serverVariable: ServerVariable) => boolean`): `ServerVariable[]` +- get(id: `string`): `ServerVariable` | `undefined` +- has(id: `string`): `boolean` ## Tag -- description() : `string` | `undefined` -- extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` -- hasDescription() : `boolean` -- hasExternalDocs() : `boolean` -- name() : `string` +- name(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- extensions(): `Extensions` ## Tags -- all() : `Tag[]` -- get(name: `string`) : `Tag` | `undefined` -- has(name: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `Tag[]` +- isEmpty(): `boolean` +- filterBy(filter: `(tag: Tag) => boolean`): `Tag[]` +- get(name: `string`): `Tag` | `undefined` +- has(name: `string`): `boolean`