From 6d47e9c242ad5a1afffd89b6f4c028fb3f6bb332 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 25 Aug 2022 18:06:50 +0200 Subject: [PATCH 01/22] feat: add 'components' and 'correlationIds' models --- docs/v1.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index 9748d17..407f516 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -1,7 +1,8 @@ -# AsyncAPI Parser API v1.0.0-alpha.3 +# AsyncAPI Parser API v1.0.0-alpha.4 ## AsyncAPIDocument - channels() : `Channels` +- components() : `Components` - defaultContentType() : `string` | `undefined` - extensions : `Extensions` - hasDefaultContentType() : `boolean` @@ -59,6 +60,23 @@ - has(id: `string`) : `boolean` - isEmpty() : `boolean` +## Components +- servers(): `Servers` +- channels(): `Channels` +- messages(): `Messages` +- schemas(): `Schemas` +- channelParameters(): `ChannelParameters` +- serverVariables(): `ServerVariables` +- operationTraits(): `OperationTraits` +- messageTraits(): `MessageTraits` +- correlationIds(): `CorrelationIds` +- securitySchemes(): `SecuritySchemes` +- serverBindings(): `Bindings` +- channelBindings(): `Bindings` +- operationBindings(): `Bindings` +- messageBindings(): `Bindings` +- isEmpty() : `boolean` + ## Contact - email() : `string` | `undefined` - extensions() : `Extensions` @@ -75,6 +93,12 @@ - hasLocation() : `boolean` - location() : `string` | `undefined` +## CorrelationIds +- all() : `CorrelationId[]` +- get(id: `string`) : `CorrelationId` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## Extension - id() : `string` - version() : `string` From 424660a9129805cf9d268e7d5030cd415fd30190 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 26 Aug 2022 10:25:35 +0200 Subject: [PATCH 02/22] Update v1.md --- docs/v1.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index 407f516..e526bdf 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -69,7 +69,7 @@ - serverVariables(): `ServerVariables` - operationTraits(): `OperationTraits` - messageTraits(): `MessageTraits` -- correlationIds(): `CorrelationIds` +- correlationIds(): `CorrelationId[]` - securitySchemes(): `SecuritySchemes` - serverBindings(): `Bindings` - channelBindings(): `Bindings` @@ -93,12 +93,6 @@ - hasLocation() : `boolean` - location() : `string` | `undefined` -## CorrelationIds -- all() : `CorrelationId[]` -- get(id: `string`) : `CorrelationId` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - ## Extension - id() : `string` - version() : `string` From 8f922db0fe2a236da5931d169076096f1bcf03d4 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 26 Aug 2022 10:52:44 +0200 Subject: [PATCH 03/22] Update v1.md --- docs/v1.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index e526bdf..cabcd20 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -71,10 +71,10 @@ - messageTraits(): `MessageTraits` - correlationIds(): `CorrelationId[]` - securitySchemes(): `SecuritySchemes` -- serverBindings(): `Bindings` -- channelBindings(): `Bindings` -- operationBindings(): `Bindings` -- messageBindings(): `Bindings` +- serverBindings(): `Map[string, Bindings]` +- channelBindings(): `Map[string, Bindings]` +- operationBindings(): `Map[string, Bindings]` +- messageBindings(): `Map[string, Bindings]` - isEmpty() : `boolean` ## Contact From f522013db38125733497bd981ed6b6a6f8af82e4 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 26 Aug 2022 11:17:57 +0200 Subject: [PATCH 04/22] Update v1.md --- docs/v1.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index cabcd20..77b0ba1 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -69,7 +69,7 @@ - serverVariables(): `ServerVariables` - operationTraits(): `OperationTraits` - messageTraits(): `MessageTraits` -- correlationIds(): `CorrelationId[]` +- correlationIds(): `CorrelationIds` - securitySchemes(): `SecuritySchemes` - serverBindings(): `Map[string, Bindings]` - channelBindings(): `Map[string, Bindings]` @@ -93,6 +93,12 @@ - hasLocation() : `boolean` - location() : `string` | `undefined` +## CorrelationIds +- all() : `CorrelationId[]` +- get(id: `string`) : `CorrelationId` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## Extension - id() : `string` - version() : `string` From 7b9b5754ebe2bd78fc5cdfaf921d4a48d6069e37 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Mon, 29 Aug 2022 12:48:53 +0200 Subject: [PATCH 05/22] add operations under components --- docs/v1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/v1.md b/docs/v1.md index 77b0ba1..efff167 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -64,6 +64,7 @@ - servers(): `Servers` - channels(): `Channels` - messages(): `Messages` +- operations() : `Operations` - schemas(): `Schemas` - channelParameters(): `ChannelParameters` - serverVariables(): `ServerVariables` From 5897a1e35ceafb349878f58ead2d649088e67e2b Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:50:05 +0200 Subject: [PATCH 06/22] add Security Requirements --- docs/v1.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index efff167..91ce6ec 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -215,7 +215,7 @@ - extensions() : `Extensions` - hasRefreshUrl() : `boolean` - refreshUrl() : `string` | `undefined` -- scopes() : `Object.<string, string>` | `undefined` +- scopes() : `Map[string, string]` | `undefined` - tokenUrl() : `string` | `undefined` ## OAuthFlows @@ -251,7 +251,7 @@ - servers() : `Server[]` - summary() : `string` | `undefined` - tags() : `Tags` -- security() : `Array }>>` +- security() : `SecurityRequirements` - isSend(): `boolean` - isReceive(): `boolean` - action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` @@ -275,7 +275,7 @@ - servers() : `Server[]` - summary() : `string` | `undefined` - tags() : `Tags` -- security() : `Array }>>` +- security() : `SecurityRequirements` - isSend(): `boolean` - isReceive(): `boolean` - action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` @@ -339,6 +339,16 @@ - has(id: `string`) : `boolean` - isEmpty() : `boolean` +## SecurityRequirement +- scheme: `SecurityScheme` +- scopes: `string[]` + +## SecurityRequirements +- all() : `SecurityRequirement[]` +- get(name: `string`) : `SecurityRequirement` | `undefined` +- has(name: `string`) : `boolean` +- isEmpty() : `boolean` + ## SecurityScheme - id() : `string` - bearerFormat() : `string` | `undefined` @@ -380,7 +390,7 @@ - operations() : `Operations` - protocol() : `string` | `undefined` - protocolVersion() : `string` | `undefined` -- security() : `Array }>>` +- security() : `SecurityRequirements` - url() : `string` | `undefined` - variables() : `ServerVariables` From 3826e0b0c13cfc551f2285e3dd3b3f43b948d233 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 30 Aug 2022 12:33:04 +0200 Subject: [PATCH 07/22] fix security requirements --- docs/v1.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index 91ce6ec..d69c6a9 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -251,7 +251,7 @@ - servers() : `Server[]` - summary() : `string` | `undefined` - tags() : `Tags` -- security() : `SecurityRequirements` +- security() : `SecurityRequirements[]` - isSend(): `boolean` - isReceive(): `boolean` - action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` @@ -275,7 +275,7 @@ - servers() : `Server[]` - summary() : `string` | `undefined` - tags() : `Tags` -- security() : `SecurityRequirements` +- security() : `SecurityRequirements[]` - isSend(): `boolean` - isReceive(): `boolean` - action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` @@ -340,8 +340,8 @@ - isEmpty() : `boolean` ## SecurityRequirement -- scheme: `SecurityScheme` -- scopes: `string[]` +- scheme(): `SecurityScheme` +- scopes(): `string[]` ## SecurityRequirements - all() : `SecurityRequirement[]` @@ -390,7 +390,7 @@ - operations() : `Operations` - protocol() : `string` | `undefined` - protocolVersion() : `string` | `undefined` -- security() : `SecurityRequirements` +- security() : `SecurityRequirements[]` - url() : `string` | `undefined` - variables() : `ServerVariables` From 50a267f7a1fefa156a386d36a85455e5b4a499d8 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:03:07 +0200 Subject: [PATCH 08/22] add missing MessageExample(s) model --- docs/v1.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index d69c6a9..30e4a80 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -157,7 +157,7 @@ - contentType() : `string` - correlationId() : `CorrelationId` | `undefined` - description() : `string` | `undefined` -- examples() : `Map[string, any][]` +- examples() : `MessageExamples` - extensions() : `Extensions` - hasCorrelationId() : `boolean` - hasDescription() : `boolean` @@ -179,6 +179,22 @@ - title() : `string` | `undefined` - traits(): `MessageTraits` +## MessageExample +- extensions() : `Extensions` +- hasName() : `boolean` +- hasSummary() : `boolean` +- headers() : `Map[string, any]` | `undefined` +- name() : `string` | `undefined` +- payload() : `Map[string, any]` | `undefined` +- summary() : `string` | `undefined` + +## MessageExamples +- all() : `MessageExample[]` +- filterBy(filter : `(messageExample: MessageExample) => boolean`) : `MessageExample[]` +- get(name: `string`) : `MessageExample` | `undefined` +- has(name: `string`) : `boolean` +- isEmpty() : `boolean` + ## MessageTraits - all() : `MessageTrait[]` - get(id: `string`) : `MessageTrait` | `undefined` @@ -191,7 +207,7 @@ - contentType() : `string` - correlationId() : `CorrelationId` | `undefined` - description() : `string` | `undefined` -- examples() : `Map[string, any][]` +- examples() : `MessageExamples` - extensions() : `Extensions` - hasCorrelationId() : `boolean` - hasDescription() : `boolean` From 83703e6f798bc55b80cae5d350112b7babb96e7d Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 30 Aug 2022 19:22:17 +0200 Subject: [PATCH 09/22] remove hasKnownSchemaFormat --- docs/v1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index 30e4a80..73e65ae 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -212,7 +212,6 @@ - hasCorrelationId() : `boolean` - hasDescription() : `boolean` - hasHeaders() : `boolean` -- hasKnownSchemaFormat() : `boolean` - hasName() : `boolean` - hasSummary() : `boolean` - hasTitle() : `boolean` From b82a10fd2549b37c2c43e04b375b56fa6de5258f Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 1 Sep 2022 12:44:20 +0200 Subject: [PATCH 10/22] add missing address and id to Channel --- docs/v1.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/v1.md b/docs/v1.md index 73e65ae..f648741 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -35,10 +35,12 @@ - isEmpty() : `boolean` ## Channel +- address() : `string` | `undefinded` - bindings() : `Bindings` - description() : `string` | `undefined` - extensions() : `Extensions` - hasDescription() : `boolean` +- id() : `string` - messages() : `Messages` - operations() : `Operations` - parameters() : `ChannelParameters` From eab44c2cc5c3fd6e8319ed1660b71121edc2907a Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 2 Sep 2022 16:56:37 +0200 Subject: [PATCH 11/22] simplify Traits since there is no clear use case --- docs/v1.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index f648741..39ecdfe 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -205,7 +205,6 @@ ## MessageTrait - bindings() : `Bindings` -- channels() : `Channels` - contentType() : `string` - correlationId() : `CorrelationId` | `undefined` - description() : `string` | `undefined` @@ -220,9 +219,7 @@ - headers() : `Schema` | `undefined` - id() : `string` - name() : `string` | `undefined` -- operations() : `Operations` - schemaFormat() : `string` -- servers() : `Servers` - summary() : `string` | `undefined` - tags() : `Tags` - title() : `string` | `undefined` @@ -282,20 +279,15 @@ ## 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() : `SecurityRequirements[]` -- isSend(): `boolean` -- isReceive(): `boolean` -- action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` ## Schema - $id() : `string` | `undefined` From 1595275920771f3f62698011ba7496ff66566f82 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:44:10 +0200 Subject: [PATCH 12/22] add extensions() to bindings model --- docs/v1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/v1.md b/docs/v1.md index 39ecdfe..b42c28a 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -21,6 +21,7 @@ ## Bindings - all() : `Binding[]` +- extensions() : `Extensions` - get(id: `string`) : `Binding` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` From 1605ee15d40e6b57140f0022e906639e0de56ee8 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:16:15 +0200 Subject: [PATCH 13/22] cleanup models --- docs/v1.md | 184 ++++++++++++++++++++++++++++------------------------- 1 file changed, 96 insertions(+), 88 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index b42c28a..4678c13 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -22,21 +22,13 @@ ## Bindings - all() : `Binding[]` - extensions() : `Extensions` +- filterBy(filter : `(binding: Binding) => boolean`) : `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` - ## Channel -- address() : `string` | `undefinded` +- address() : `string` - bindings() : `Bindings` - description() : `string` | `undefined` - extensions() : `Extensions` @@ -47,6 +39,15 @@ - parameters() : `ChannelParameters` - servers() : `Servers` +## Channels +- all() : `Channel[]` +- filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` +- filterBySend() : `Channel[]` +- filterByReceive() : `Channel[]` +- get(id: `string`) : `Channel` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## ChannelParameter - id() : `string` - hasDescription() : `boolean` @@ -59,6 +60,7 @@ ## ChannelParameters - all() : `ChannelParameter[]` +- filterBy(filter : `(parameter: ChannelParameter) => boolean`) : `ChannelParameter[]` - get(id: `string`) : `ChannelParameter` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -99,6 +101,7 @@ ## CorrelationIds - all() : `CorrelationId[]` +- filterBy(filter : `(correlationId: CorrelationId) => boolean`) : `CorrelationId[]` - get(id: `string`) : `CorrelationId` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -110,22 +113,22 @@ ## Extensions - all() : `Extension[]` +- filterBy(filter : `(extension: Extension) => boolean`) : `Extension[]` - get(id: `string`) : `Extension` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` -## ExternalDocument +## ExternalDocumention - description() : `string` | `undefined` - extensions() : `Extensions` - hasDescription() : `boolean` -- hasUrl() : `boolean` -- url() : `string` | `undefined` +- url() : `string` ## Info -- contact() : `Contact | undefined` +- contact() : `Contact` | `undefined` - description() : `string` | `undefined` - extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` +- externalDocs() : `ExternalDocumention` | `undefined` - hasContact() : `boolean` - hasDescription() : `boolean` - hasExternalDocs() : `boolean` @@ -145,15 +148,6 @@ - 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` - ## Message - bindings() : `Bindings` - channels() : `Channels` @@ -165,7 +159,6 @@ - hasCorrelationId() : `boolean` - hasDescription() : `boolean` - hasHeaders() : `boolean` -- hasKnownSchemaFormat() : `boolean` - hasName() : `boolean` - hasSummary() : `boolean` - hasTitle() : `boolean` @@ -174,7 +167,7 @@ - name() : `string` | `undefined` - operations() : `Operations` - hasPayload() : `boolean` -- payload() : `Schema | any` +- payload() : `Schema` | `undefined` - schemaFormat() : `string` - servers() : `Servers` - summary() : `string` | `undefined` @@ -182,6 +175,15 @@ - title() : `string` | `undefined` - traits(): `MessageTraits` +## Messages +- all() : `Message[]` +- filterBy(filter : `(message: Message) => boolean`) : `Message[]` +- filterBySend() : `Message[]` +- filterByReceive() : `Message[]` +- get(id: `string`) : `Message` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## MessageExample - extensions() : `Extensions` - hasName() : `boolean` @@ -198,15 +200,9 @@ - has(name: `string`) : `boolean` - isEmpty() : `boolean` -## MessageTraits -- all() : `MessageTrait[]` -- get(id: `string`) : `MessageTrait` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` - ## MessageTrait - bindings() : `Bindings` -- contentType() : `string` +- contentType() : `string` | `undefined` - correlationId() : `CorrelationId` | `undefined` - description() : `string` | `undefined` - examples() : `MessageExamples` @@ -225,6 +221,13 @@ - tags() : `Tags` - title() : `string` | `undefined` +## MessageTraits +- all() : `MessageTrait[]` +- filterBy(filter : `(messageTrait: MessageTrait) => boolean`) : `MessageTrait[]` +- get(id: `string`) : `MessageTrait` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## OAuthFlow - authorizationUrl() : `string` | `undefined` - extensions() : `Extensions` @@ -244,21 +247,12 @@ - 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` +- externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasSummary() : `boolean` - id() : `string` @@ -269,12 +263,15 @@ - security() : `SecurityRequirements[]` - isSend(): `boolean` - isReceive(): `boolean` -- action() : `enum{'Send', 'Receive', 'Publish', 'Subscribe'}` +- action() : `enum{'send', 'receive', 'publish', 'subscribe'}` - traits: `OperationTraits` -## OperationTraits -- all() : `OperationTrait[]` -- get(id: `string`) : `OperationTrait` | `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` @@ -282,7 +279,7 @@ - bindings() : `Bindings` - description() : `string` | `undefined` - extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` +- externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasSummary() : `boolean` - id() : `string` @@ -290,34 +287,40 @@ - tags() : `Tags` - security() : `SecurityRequirements[]` +## OperationTraits +- all() : `OperationTrait[]` +- filterBy(filter : `(operationTrait: OperationTrait) => boolean`) : `OperationTrait[]` +- get(id: `string`) : `OperationTrait` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## Schema - $id() : `string` | `undefined` -- additionalItems : `boolean | Schema` -- additionalProperties : `boolean | Schema` -- allOf : `Schema[]` -- anyOf : `Schema[]` +- additionalItems : `boolean` | `Schema` +- additionalProperties : `boolean` | `Schema` +- allOf : `Schema[]` | `undefined` +- anyOf : `Schema[]` | `undefined` - const : `any` -- contains : `Schema` +- contains : `Schema` | `undefined` - contentEncoding : `string` | `undefined` - contentMediaType : `string` | `undefined` - default : `any` -- definitions : `Map[string, Schema]` +- definitions : `Map[string, Schema]` | `undefined` - description : `string` | `undefined` -- dependencies : `Map[string, Schema|string[]]` +- dependencies : `Map[string, Schema|string[]]` | `undefined` - deprecated : `boolean` - discriminator : `string` | `undefined` -- else : `Schema` +- else : `Schema` | `undefined` - extensions() : `Extensions` -- enum : `any[]` -- examples : `any[]` +- enum : `any[]` | `undefined` +- examples : `any[]` | `undefined` - exclusiveMaximum() : `number` | `undefined` - exclusiveMinimum : `number` | `undefined` - format : `string` | `undefined` -- circularSchema : `Schema` - isBooleanSchema: `boolean` -- if : `Schema` +- if : `Schema` | `undefined` - isCircular : `boolean` -- items : `Schema | Schema[]` +- items : `Schema` | `Schema[]` | `undefined` - maximum() : `number` | `undefined` - maxItems : `number` | `undefined` - maxLength : `number` | `undefined` @@ -327,24 +330,25 @@ - minLength : `number` | `undefined` - minProperties : `number` | `undefined` - multipleOf() : `number` | `undefined` -- not : `Schema` -- oneOf : `Schema[]` +- not : `Schema` | `undefined` +- oneOf : `Schema[]` | `undefined` - pattern : `string` | `undefined` -- patternProperties : `Map[string, Schema]` -- properties : `Map[string, Schema]` +- patternProperties : `Map[string, Schema]` | `undefined` +- properties : `Map[string, Schema]` | `undefined` - property(name: `string`) : `Schema` -- propertyNames : `Schema` +- propertyNames : `Schema` | `undefined` - readOnly : `boolean` | `undefined` -- required : `string[]` -- then : `Schema` +- required : `string[]` | `undefined` +- then : `Schema` | `undefined` - title : `string` | `undefined` -- type : `string | string[]` +- type : `string` | `string[]` | `undefined` - uid() : `string` - uniqueItems : `boolean` | `undefined` - writeOnly : `boolean` | `undefined` ## Schemas - all() : `Schema[]` +- filterBy(filter : `(schema: Schema) => boolean`) : `Schema[]` - get(id: `string`) : `Schema` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -355,6 +359,7 @@ ## SecurityRequirements - all() : `SecurityRequirement[]` +- filterBy(filter : `(securityRequirement: SecurityRequirement) => boolean`) : `SecurityRequirement[]` - get(name: `string`) : `SecurityRequirement` | `undefined` - has(name: `string`) : `boolean` - isEmpty() : `boolean` @@ -362,32 +367,24 @@ ## SecurityScheme - id() : `string` - bearerFormat() : `string` | `undefined` -- description() : `string` +- description() : `string` | `undefined` - extensions() : `Extensions` -- flows() : `OAuthFlows` +- flows() : `OAuthFlows` | `undefined` - hasBearerFormat() : `boolean` - hasDescription() : `boolean` -- in() : `enum{'user', 'password', 'query', 'header', 'cookie'}` +- in() : `enum{'user', 'password', 'query', 'header', 'cookie'}` | `undefined` - openIdConnectUrl() : `string` - scheme() : `string` | `undefined` - scopes() : `string[]` -- type() : `enum{'userPassword', 'apiKey', 'X509', 'symmetricEncryption', 'asymmetricEncryption', 'httpApiKey', 'http', 'oauth2', 'openIdConnect'}` +- type() : `enum{'userPassword', 'apiKey', 'X509', 'symmetricEncryption', 'asymmetricEncryption', 'httpApiKey', 'http', 'oauth2', 'openIdConnect', 'plain', 'scramSha256', 'scramSha512', 'gssapi'}` # SecuritySchemes - all() : `SecurityScheme[]` +- filterBy(filter : `(securityScheme: SecurityScheme) => boolean`) : `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` - ## Server - bindings() : `Bindings` - channels() : `Channels` @@ -398,14 +395,23 @@ - messages() : `Messages` - name() : `string` | `undefined` - operations() : `Operations` -- protocol() : `string` | `undefined` +- protocol() : `string` - protocolVersion() : `string` | `undefined` - security() : `SecurityRequirements[]` -- url() : `string` | `undefined` +- url() : `string` - variables() : `ServerVariables` +## Servers +- all() : `Server[]` +- filterBy(filter : `(server: Server) => boolean`) : `Server[]` +- filterBySend() : `Server[]` +- filterByReceive() : `Server[]` +- get(id: `string`) : `Server` | `undefined` +- has(id: `string`) : `boolean` +- isEmpty() : `boolean` + ## ServerVariable -- allowedValues() : `any[]` +- allowedValues() : `string[]` - defaultValue() : `string` | `undefined` - description() : `string` | `undefined` - examples() : `string[]` @@ -417,20 +423,22 @@ ## ServerVariables - all() : `ServerVariable[]` -- get(name: `string`) : `ServerVariable` | `undefined` -- has(name: `string`) : `boolean` +- filterBy(filter : `(serverVariable: ServerVariable) => boolean`) : `ServerVariable[]` +- get(id: `string`) : `ServerVariable` | `undefined` +- has(id: `string`) : `boolean` - isEmpty() : `boolean` ## Tag - description() : `string` | `undefined` - extensions() : `Extensions` -- externalDocs() : `ExternalDocument` | `undefined` +- externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasExternalDocs() : `boolean` - name() : `string` ## Tags - all() : `Tag[]` +- filterBy(filter : `(tag: Tag) => boolean`) : `Tag[]` - get(name: `string`) : `Tag` | `undefined` - has(name: `string`) : `boolean` - isEmpty() : `boolean` From a3db4f30503c3b1e90f219299fda1f1cd17c87c3 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 15 Sep 2022 14:06:02 +0200 Subject: [PATCH 14/22] add `filterByInUse()` and `filterByNotInUse()` --- docs/v1.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/v1.md b/docs/v1.md index 4678c13..1c2da13 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -44,6 +44,8 @@ - filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` - filterBySend() : `Channel[]` - filterByReceive() : `Channel[]` +- filterByInUse() : `Channel[]` +- filterByNotInUse() : `Channel[]` - get(id: `string`) : `Channel` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -180,6 +182,8 @@ - filterBy(filter : `(message: Message) => boolean`) : `Message[]` - filterBySend() : `Message[]` - filterByReceive() : `Message[]` +- filterByInUse() : `Message[]` +- filterByNotInUse() : `Message[]` - get(id: `string`) : `Message` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -271,6 +275,8 @@ - filterBy(filter : `(operation: Operation) => boolean`) : `Operation[]` - filterBySend() : `Operation[]` - filterByReceive() : `Operation[]` +- filterByInUse() : `Operation[]` +- filterByNotInUse() : `Operation[]` - get(id: `string`) : `Operation` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -349,6 +355,8 @@ ## Schemas - all() : `Schema[]` - filterBy(filter : `(schema: Schema) => boolean`) : `Schema[]` +- filterByInUse() : `Schema[]` +- filterByNotInUse() : `Schema[]` - get(id: `string`) : `Schema` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -406,6 +414,8 @@ - filterBy(filter : `(server: Server) => boolean`) : `Server[]` - filterBySend() : `Server[]` - filterByReceive() : `Server[]` +- filterByInUse() : `Server[]` +- filterByNotInUse() : `Server[]` - get(id: `string`) : `Server` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` From 14cd75e944d1589857cc4e790115840f76a2b9b9 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 4 Oct 2022 16:14:43 +0200 Subject: [PATCH 15/22] Remove filters by usage +add all* methods --- docs/v1.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index 1c2da13..cb3134d 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -2,6 +2,11 @@ ## AsyncAPIDocument - channels() : `Channels` +- allChannels() : `Channels` +- allMessages() : `Messages` +- allOperations() : `Operations` +- allSchemas() : `Schemas` +- allServers() : `Servers` - components() : `Components` - defaultContentType() : `string` | `undefined` - extensions : `Extensions` @@ -44,8 +49,8 @@ - filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` - filterBySend() : `Channel[]` - filterByReceive() : `Channel[]` -- filterByInUse() : `Channel[]` -- filterByNotInUse() : `Channel[]` + + - get(id: `string`) : `Channel` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -182,8 +187,8 @@ - filterBy(filter : `(message: Message) => boolean`) : `Message[]` - filterBySend() : `Message[]` - filterByReceive() : `Message[]` -- filterByInUse() : `Message[]` -- filterByNotInUse() : `Message[]` + + - get(id: `string`) : `Message` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -275,8 +280,8 @@ - filterBy(filter : `(operation: Operation) => boolean`) : `Operation[]` - filterBySend() : `Operation[]` - filterByReceive() : `Operation[]` -- filterByInUse() : `Operation[]` -- filterByNotInUse() : `Operation[]` + + - get(id: `string`) : `Operation` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -355,8 +360,8 @@ ## Schemas - all() : `Schema[]` - filterBy(filter : `(schema: Schema) => boolean`) : `Schema[]` -- filterByInUse() : `Schema[]` -- filterByNotInUse() : `Schema[]` + + - get(id: `string`) : `Schema` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -414,8 +419,8 @@ - filterBy(filter : `(server: Server) => boolean`) : `Server[]` - filterBySend() : `Server[]` - filterByReceive() : `Server[]` -- filterByInUse() : `Server[]` -- filterByNotInUse() : `Server[]` + + - get(id: `string`) : `Server` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` From 33e40255b13df1503157efe5422b0b6cf3e5fc41 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Wed, 5 Oct 2022 09:57:15 +0200 Subject: [PATCH 16/22] remove empty lines --- docs/v1.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index cb3134d..2d30748 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -49,8 +49,6 @@ - filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` - filterBySend() : `Channel[]` - filterByReceive() : `Channel[]` - - - get(id: `string`) : `Channel` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -187,8 +185,6 @@ - filterBy(filter : `(message: Message) => boolean`) : `Message[]` - filterBySend() : `Message[]` - filterByReceive() : `Message[]` - - - get(id: `string`) : `Message` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -280,8 +276,6 @@ - filterBy(filter : `(operation: Operation) => boolean`) : `Operation[]` - filterBySend() : `Operation[]` - filterByReceive() : `Operation[]` - - - get(id: `string`) : `Operation` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -360,8 +354,6 @@ ## Schemas - all() : `Schema[]` - filterBy(filter : `(schema: Schema) => boolean`) : `Schema[]` - - - get(id: `string`) : `Schema` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` @@ -419,8 +411,6 @@ - filterBy(filter : `(server: Server) => boolean`) : `Server[]` - filterBySend() : `Server[]` - filterByReceive() : `Server[]` - - - get(id: `string`) : `Server` | `undefined` - has(id: `string`) : `boolean` - isEmpty() : `boolean` From 0ae8f98405ed49e26bb46b7d73eea5efd51f1d4f Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 6 Oct 2022 10:22:53 +0200 Subject: [PATCH 17/22] change schema.uid() method to schema.id() --- docs/v1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index 2d30748..d852c45 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -322,6 +322,7 @@ - exclusiveMaximum() : `number` | `undefined` - exclusiveMinimum : `number` | `undefined` - format : `string` | `undefined` +- id() : `string` - isBooleanSchema: `boolean` - if : `Schema` | `undefined` - isCircular : `boolean` @@ -347,7 +348,6 @@ - then : `Schema` | `undefined` - title : `string` | `undefined` - type : `string` | `string[]` | `undefined` -- uid() : `string` - uniqueItems : `boolean` | `undefined` - writeOnly : `boolean` | `undefined` From 874fccd859a168239155b1a5dc7fc6e23ef0e22f Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 7 Oct 2022 14:26:30 +0200 Subject: [PATCH 18/22] Update docs/v1.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maciej Urbańczyk --- docs/v1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/v1.md b/docs/v1.md index d852c45..0ef09e7 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -404,6 +404,7 @@ - protocolVersion() : `string` | `undefined` - security() : `SecurityRequirements[]` - url() : `string` +- tags() : `Tags` - variables() : `ServerVariables` ## Servers From fb434bf26b8e4ac3ce9dd26081da39a94f9dc93a Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Mon, 10 Oct 2022 10:05:40 +0200 Subject: [PATCH 19/22] update README --- README.md | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) 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. From 835892a82731caf9cc4a89cfa0d2622f0f91d25f Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 27 Oct 2022 15:47:57 +0200 Subject: [PATCH 20/22] Update docs/v1.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Maciej Urbańczyk --- docs/v1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index 0ef09e7..a4e90bb 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -113,7 +113,6 @@ ## Extension - id() : `string` -- version() : `string` - value() : `any` ## Extensions From fc99a2aa418dcbb35ab4db5c742e6fc4fd20b4cc Mon Sep 17 00:00:00 2001 From: Matatjahu Date: Tue, 20 Dec 2022 13:19:40 +0100 Subject: [PATCH 21/22] add payload() to the Messages model and extension(id) method --- docs/v1.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/v1.md b/docs/v1.md index a4e90bb..a239d3d 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -9,7 +9,8 @@ - allServers() : `Servers` - components() : `Components` - defaultContentType() : `string` | `undefined` -- extensions : `Extensions` +- extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasDefaultContentType() : `boolean` - info() : `Info` - messages() : `Messages` @@ -27,6 +28,7 @@ ## Bindings - all() : `Binding[]` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - filterBy(filter : `(binding: Binding) => boolean`) : `Binding[]` - get(id: `string`) : `Binding` | `undefined` - has(id: `string`) : `boolean` @@ -37,6 +39,7 @@ - bindings() : `Bindings` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasDescription() : `boolean` - id() : `string` - messages() : `Messages` @@ -62,6 +65,7 @@ - hasLocation() : `boolean` - location(): `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` ## ChannelParameters - all() : `ChannelParameter[]` @@ -91,6 +95,7 @@ ## Contact - email() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasEmail() : `boolean` - hasName() : `boolean` - hasUrl() : `boolean` @@ -100,6 +105,7 @@ ## CorrelationId - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasDescription() : `boolean` - hasLocation() : `boolean` - location() : `string` | `undefined` @@ -125,6 +131,7 @@ ## ExternalDocumention - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasDescription() : `boolean` - url() : `string` @@ -132,6 +139,7 @@ - contact() : `Contact` | `undefined` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - externalDocs() : `ExternalDocumention` | `undefined` - hasContact() : `boolean` - hasDescription() : `boolean` @@ -148,6 +156,7 @@ ## License - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasUrl() : `boolean` - name() : `string` - url() : `string` | `undefined` @@ -160,6 +169,7 @@ - description() : `string` | `undefined` - examples() : `MessageExamples` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasCorrelationId() : `boolean` - hasDescription() : `boolean` - hasHeaders() : `boolean` @@ -186,10 +196,12 @@ - filterByReceive() : `Message[]` - get(id: `string`) : `Message` | `undefined` - has(id: `string`) : `boolean` +- payload() : `Schema` | `undefined` - isEmpty() : `boolean` ## MessageExample - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasName() : `boolean` - hasSummary() : `boolean` - headers() : `Map[string, any]` | `undefined` @@ -211,6 +223,7 @@ - description() : `string` | `undefined` - examples() : `MessageExamples` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasCorrelationId() : `boolean` - hasDescription() : `boolean` - hasHeaders() : `boolean` @@ -235,6 +248,7 @@ ## OAuthFlow - authorizationUrl() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasRefreshUrl() : `boolean` - refreshUrl() : `string` | `undefined` - scopes() : `Map[string, string]` | `undefined` @@ -244,6 +258,7 @@ - authorizationCode() : `OAuthFlow` | `undefined` - clientCredentials() : `OAuthFlow` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasAuthorizationCode() : `boolean` - hasClientCredentials() : `boolean` - hasImplicit() : `boolean` @@ -256,6 +271,7 @@ - channels() : `Channel[]` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasSummary() : `boolean` @@ -283,6 +299,7 @@ - bindings() : `Bindings` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasSummary() : `boolean` @@ -316,6 +333,7 @@ - discriminator : `string` | `undefined` - else : `Schema` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - enum : `any[]` | `undefined` - examples : `any[]` | `undefined` - exclusiveMaximum() : `number` | `undefined` @@ -373,6 +391,7 @@ - bearerFormat() : `string` | `undefined` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - flows() : `OAuthFlows` | `undefined` - hasBearerFormat() : `boolean` - hasDescription() : `boolean` @@ -394,6 +413,7 @@ - channels() : `Channels` - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasDescription() : `boolean` - hasProtocolVersion() : `boolean` - messages() : `Messages` @@ -421,6 +441,7 @@ - description() : `string` | `undefined` - examples() : `string[]` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - hasAllowedValues() : `boolean` - hasDefaultValue() : `boolean` - hasDescription() : `boolean` @@ -436,6 +457,7 @@ ## Tag - description() : `string` | `undefined` - extensions() : `Extensions` +- extension(id: `string`) : `Extension` | `undefined` - externalDocs() : `ExternalDocumention` | `undefined` - hasDescription() : `boolean` - hasExternalDocs() : `boolean` From dc68fe29fdc27a0d846e626138102d0200797248 Mon Sep 17 00:00:00 2001 From: Matatjahu Date: Wed, 8 Feb 2023 13:59:17 +0100 Subject: [PATCH 22/22] fix API --- docs/v1.md | 746 ++++++++++++++++++++++++++--------------------------- 1 file changed, 371 insertions(+), 375 deletions(-) diff --git a/docs/v1.md b/docs/v1.md index a239d3d..b118380 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -1,84 +1,80 @@ # AsyncAPI Parser API v1.0.0-alpha.4 ## AsyncAPIDocument -- channels() : `Channels` -- allChannels() : `Channels` -- allMessages() : `Messages` -- allOperations() : `Operations` -- allSchemas() : `Schemas` -- allServers() : `Servers` -- components() : `Components` -- defaultContentType() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- 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[]` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- filterBy(filter : `(binding: Binding) => boolean`) : `Binding[]` -- get(id: `string`) : `Binding` | `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 -- address() : `string` -- bindings() : `Bindings` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- hasDescription() : `boolean` -- id() : `string` -- 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[]` -- filterBy(filter : `(channel: Channel) => boolean`) : `Channel[]` -- filterBySend() : `Channel[]` -- filterByReceive() : `Channel[]` -- get(id: `string`) : `Channel` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- 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` -- extension(id: `string`) : `Extension` | `undefined` +- extensions(): `Extensions` ## ChannelParameters -- all() : `ChannelParameter[]` -- filterBy(filter : `(parameter: ChannelParameter) => boolean`) : `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` +- operations(): `Operations` - schemas(): `Schemas` - channelParameters(): `ChannelParameters` - serverVariables(): `ServerVariables` @@ -86,386 +82,386 @@ - messageTraits(): `MessageTraits` - correlationIds(): `CorrelationIds` - securitySchemes(): `SecuritySchemes` -- serverBindings(): `Map[string, Bindings]` -- channelBindings(): `Map[string, Bindings]` -- operationBindings(): `Map[string, Bindings]` -- messageBindings(): `Map[string, Bindings]` -- isEmpty() : `boolean` +- serverBindings(): `Map` +- channelBindings(): `Map` +- operationBindings(): `Map` +- messageBindings(): `Map` +- isEmpty(): `boolean` ## Contact -- email() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- 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` -- extension(id: `string`) : `Extension` | `undefined` -- hasDescription() : `boolean` -- hasLocation() : `boolean` -- location() : `string` | `undefined` +- location(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- extensions(): `Extensions` ## CorrelationIds -- all() : `CorrelationId[]` -- filterBy(filter : `(correlationId: CorrelationId) => boolean`) : `CorrelationId[]` -- get(id: `string`) : `CorrelationId` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `CorrelationId[]` +- isEmpty(): `boolean` +- filterBy(filter: `(correlationId: CorrelationId) => boolean`): `CorrelationId[]` +- get(id: `string`): `CorrelationId` | `undefined` +- has(id: `string`): `boolean` ## Extension -- id() : `string` -- value() : `any` +- id(): `string` +- value(): `any` ## Extensions -- all() : `Extension[]` -- filterBy(filter : `(extension: Extension) => boolean`) : `Extension[]` -- get(id: `string`) : `Extension` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `Extension[]` +- isEmpty(): `boolean` +- filterBy(filter: `(extension: Extension) => boolean`): `Extension[]` +- get(id: `string`): `Extension` | `undefined` +- has(id: `string`): `boolean` ## ExternalDocumention -- description() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- hasDescription() : `boolean` -- url() : `string` +- url(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- extensions(): `Extensions` ## Info -- contact() : `Contact` | `undefined` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- externalDocs() : `ExternalDocumention` | `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` -- extension(id: `string`) : `Extension` | `undefined` -- hasUrl() : `boolean` -- name() : `string` -- url() : `string` | `undefined` +- name(): `string` +- hasUrl(): `boolean` +- url(): `string` | `undefined` +- extensions(): `Extensions` ## Message -- bindings() : `Bindings` -- channels() : `Channels` -- contentType() : `string` -- correlationId() : `CorrelationId` | `undefined` -- description() : `string` | `undefined` -- examples() : `MessageExamples` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- hasCorrelationId() : `boolean` -- hasDescription() : `boolean` -- hasHeaders() : `boolean` -- hasName() : `boolean` -- hasSummary() : `boolean` -- hasTitle() : `boolean` -- headers() : `Schema` | `undefined` -- id() : `string` -- name() : `string` | `undefined` -- operations() : `Operations` -- hasPayload() : `boolean` -- payload() : `Schema` | `undefined` -- 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` ## Messages -- all() : `Message[]` -- filterBy(filter : `(message: Message) => boolean`) : `Message[]` -- filterBySend() : `Message[]` -- filterByReceive() : `Message[]` -- get(id: `string`) : `Message` | `undefined` -- has(id: `string`) : `boolean` -- payload() : `Schema` | `undefined` -- isEmpty() : `boolean` +- all(): `Message[]` +- isEmpty(): `boolean` +- filterBy(filter: `(message: Message) => boolean`): `Message[]` +- filterBySend(): `Message[]` +- filterByReceive(): `Message[]` +- get(id: `string`): `Message` | `undefined` +- has(id: `string`): `boolean` ## MessageExample -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- hasName() : `boolean` -- hasSummary() : `boolean` -- headers() : `Map[string, any]` | `undefined` -- name() : `string` | `undefined` -- payload() : `Map[string, any]` | `undefined` -- summary() : `string` | `undefined` +- hasName(): `boolean` +- name(): `string` | `undefined` +- hasSummary(): `boolean` +- summary(): `string` | `undefined` +- headers(): `Map` | `undefined` +- payload(): `Map` | `undefined` +- extensions(): `Extensions` ## MessageExamples -- all() : `MessageExample[]` -- filterBy(filter : `(messageExample: MessageExample) => boolean`) : `MessageExample[]` -- get(name: `string`) : `MessageExample` | `undefined` -- has(name: `string`) : `boolean` -- isEmpty() : `boolean` +- all(): `MessageExample[]` +- isEmpty(): `boolean` +- filterBy(filter: `(messageExample: MessageExample) => boolean`): `MessageExample[]` +- get(name: `string`): `MessageExample` | `undefined` +- has(name: `string`): `boolean` ## MessageTrait -- bindings() : `Bindings` -- contentType() : `string` | `undefined` -- correlationId() : `CorrelationId` | `undefined` -- description() : `string` | `undefined` -- examples() : `MessageExamples` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- hasCorrelationId() : `boolean` -- hasDescription() : `boolean` -- hasHeaders() : `boolean` -- hasName() : `boolean` -- hasSummary() : `boolean` -- hasTitle() : `boolean` -- headers() : `Schema` | `undefined` -- id() : `string` -- name() : `string` | `undefined` -- schemaFormat() : `string` -- 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[]` -- filterBy(filter : `(messageTrait: MessageTrait) => boolean`) : `MessageTrait[]` -- get(id: `string`) : `MessageTrait` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- 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` -- extension(id: `string`) : `Extension` | `undefined` -- hasRefreshUrl() : `boolean` -- refreshUrl() : `string` | `undefined` -- scopes() : `Map[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` -- extension(id: `string`) : `Extension` | `undefined` -- hasAuthorizationCode() : `boolean` -- hasClientCredentials() : `boolean` -- hasImplicit() : `boolean` -- hasPassword() : `boolean` -- implicit() : `OAuthFlow` | `undefined` -- password() : `OAuthFlow` | `undefined` - -## Operation -- bindings() : `Bindings` -- channels() : `Channel[]` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- externalDocs() : `ExternalDocumention` | `undefined` -- hasDescription() : `boolean` -- hasSummary() : `boolean` -- id() : `string` -- messages() : `Message[]` -- servers() : `Server[]` -- summary() : `string` | `undefined` -- tags() : `Tags` -- security() : `SecurityRequirements[]` +- 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` ## Operations -- all() : `Operation[]` -- filterBy(filter : `(operation: Operation) => boolean`) : `Operation[]` -- filterBySend() : `Operation[]` -- filterByReceive() : `Operation[]` -- get(id: `string`) : `Operation` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- 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` -- description() : `string` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- externalDocs() : `ExternalDocumention` | `undefined` -- hasDescription() : `boolean` -- hasSummary() : `boolean` -- id() : `string` -- summary() : `string` | `undefined` -- tags() : `Tags` -- security() : `SecurityRequirements[]` +- 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[]` -- filterBy(filter : `(operationTrait: OperationTrait) => boolean`) : `OperationTrait[]` -- get(id: `string`) : `OperationTrait` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- 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[]` | `undefined` -- anyOf : `Schema[]` | `undefined` -- const : `any` -- contains : `Schema` | `undefined` -- contentEncoding : `string` | `undefined` -- contentMediaType : `string` | `undefined` -- default : `any` -- definitions : `Map[string, Schema]` | `undefined` -- description : `string` | `undefined` -- dependencies : `Map[string, Schema|string[]]` | `undefined` -- deprecated : `boolean` -- discriminator : `string` | `undefined` -- else : `Schema` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- 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[string, Schema]` | `undefined` -- properties : `Map[string, Schema]` | `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` +- $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[]` -- filterBy(filter : `(schema: Schema) => boolean`) : `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` +- 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` | `undefined` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- flows() : `OAuthFlows` | `undefined` -- hasBearerFormat() : `boolean` -- hasDescription() : `boolean` -- in() : `enum{'user', 'password', 'query', 'header', 'cookie'}` | `undefined` -- openIdConnectUrl() : `string` -- scheme() : `string` | `undefined` -- scopes() : `string[]` -- type() : `enum{'userPassword', 'apiKey', 'X509', 'symmetricEncryption', 'asymmetricEncryption', 'httpApiKey', 'http', 'oauth2', 'openIdConnect', 'plain', 'scramSha256', 'scramSha512', 'gssapi'}` +- 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[]` -- filterBy(filter : `(securityScheme: SecurityScheme) => boolean`) : `SecurityScheme[]` -- get(id: `string`) : `SecurityScheme` | `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` -- extension(id: `string`) : `Extension` | `undefined` -- hasDescription() : `boolean` -- hasProtocolVersion() : `boolean` -- messages() : `Messages` -- name() : `string` | `undefined` -- operations() : `Operations` -- protocol() : `string` -- protocolVersion() : `string` | `undefined` -- security() : `SecurityRequirements[]` -- url() : `string` -- tags() : `Tags` -- 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[]` -- filterBy(filter : `(server: Server) => boolean`) : `Server[]` -- filterBySend() : `Server[]` -- filterByReceive() : `Server[]` -- get(id: `string`) : `Server` | `undefined` -- has(id: `string`) : `boolean` -- isEmpty() : `boolean` +- 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() : `string[]` -- defaultValue() : `string` | `undefined` -- description() : `string` | `undefined` -- examples() : `string[]` -- extensions() : `Extensions` -- extension(id: `string`) : `Extension` | `undefined` -- 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[]` -- filterBy(filter : `(serverVariable: ServerVariable) => boolean`) : `ServerVariable[]` -- get(id: `string`) : `ServerVariable` | `undefined` -- has(id: `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` -- extension(id: `string`) : `Extension` | `undefined` -- externalDocs() : `ExternalDocumention` | `undefined` -- hasDescription() : `boolean` -- hasExternalDocs() : `boolean` -- name() : `string` +- name(): `string` +- hasDescription(): `boolean` +- description(): `string` | `undefined` +- hasExternalDocs(): `boolean` +- externalDocs(): `ExternalDocumention` | `undefined` +- extensions(): `Extensions` ## Tags -- all() : `Tag[]` -- filterBy(filter : `(tag: Tag) => boolean`) : `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`