From ac0ea63c27c4a085ab49f6d88fe8b5ac2478cdf4 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 25 Mar 2021 13:58:39 +0100 Subject: [PATCH 01/18] Initial suggestion --- docs/API.md | 50 +++++++++++++++++++++++++++++++++++++++ docs/Intents.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 docs/API.md create mode 100644 docs/Intents.md diff --git a/docs/API.md b/docs/API.md new file mode 100644 index 000000000..d5cbf0e19 --- /dev/null +++ b/docs/API.md @@ -0,0 +1,50 @@ + +### Root - AsyncAPIDocument +- `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) +- `AsyncAPIDocument.channels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- **(HELP NEEDED)** `AsyncAPIDocument.channelsSubscribes('')` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- **(HELP NEEDED)** `AsyncAPIDocument.channelsPublishes('')` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- **(HELP NEEDED)** `AsyncAPIDocument.isSubscribingToChannels('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) +- **(HELP NEEDED)** `AsyncAPIDocument.isPublishingToChannels('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) +- `AsyncAPIDocument.messages()` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.schemas()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.json()` : string (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) +- `AsyncAPIDocument.securitySchemes()` : SecurityScheme[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) + +### Info +- `Info.title()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) +- `Info.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Info.version()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) + +### Server +- `Server.name()` : string +- `Server.protocol()` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) + +### SecurityScheme +Empty for now. + +### Channel +- `Channel.path()` : string +- `Channel.messages()` : Message[] +- **(HELP NEEDED)** `Channel.messagesPublishes('')` : Message[] +- **(HELP NEEDED)** `Channel.messagesSubscribes('')` : Message[] +- `Channel.isSubscribing('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.isPublishing('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.extension('')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- **(HELP NEEDED)** `Channel.extensionForPublishing('', '')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- **(HELP NEEDED)** `Channel.extensionForSubscribing('', '')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Channel.binding('', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- **(HELP NEEDED)** `Channel.bindingForSubscribing('', '', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- **(HELP NEEDED)** `Channel.bindingForPublishing('', ', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- **(HELP NEEDED)** `Channel.summaryForPublishing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- **(HELP NEEDED)** `Channel.summaryForSubscribing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.parameters()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- **(HELP NEEDED)** `Channel.operationIdForPublishing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- **(HELP NEEDED)** `Channel.operationIdForSubscribing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) + +### Message +- `Message.headers()` : Schema (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) \ No newline at end of file diff --git a/docs/Intents.md b/docs/Intents.md new file mode 100644 index 000000000..6f16f08cf --- /dev/null +++ b/docs/Intents.md @@ -0,0 +1,63 @@ +# Intents +As we see it we have two options/concepts we can follow in regards to how we structure intents. + +1. **All intents under one roof** so everything flows through the root such as: `AsyncAPIDocument.extensionForChannelThatApplicationSubscribesTo('', '')` + +2. **Wrap intents in models**, to provide an independent concepts that will always exist regardless of the specification. + +Reason why we suggest to go with option 2 is: +- It is more maintainable, we would end up with an incomprehensible amount of intents in the same class, not to mention the length of the name for them. +- When viewed from the tooling perspective these models would also make sense and make it iteratable. +- To be consistent, so we do not reject intents on unclear rules making it confusing to understand. + +## Models +These are following models which we have identified and suggest we stick to. +- **Message**, because message can exist without operation, and channels. +- **Channel**, the core model (almost) everything flows around +- **Server**, you have to connect to something +- **Info**, defined information about your document +- **Schema**, JSON Schema draft 7, leave as is and don't create intents for it. +- **SecurityScheme**, does not have any intents tied to it at the moment, since we don't have a directly use-case/example. + +### Rules +To remove confusion on when something is a model and when it is not, where and when intents are added we have defined some rules for the models: +- Root level intents SHOULD never return properties of models but instead answer questions, return the model itself or a collection of models + - Reason why root level does not return properties, is because we need to limit the number of nested intents. + - i.e. to avoid `AsyncAPIDocument.extensionForChannelThatApplicationSubscribesTo('', '')` +- Models contain intents to return properties, answer questions, return other model or a collection of models. + - Reason behind this is to segregate intents by responsibility. +- Models are entity objects and should not be value objects + - So why are operation for example not an entity? Because we don't see the operation as needing an identity, it merely contains values we need associated with the Channel. + +## Initial intents and models +These are the intents together with the model they belong to. **(HELP NEEDED)** implies that we are unsure about the naming of the intent, especially since we are not native speakers. + +### Decisions + +* We decided to introduce the `role` parameter for intents that have a common implementation based on the combination of what we currently call operation type (`publish/subscribe`) plus the context or point of view of the current role (`Application/Client`). The parameter is mandatory to always make the user specify their role and avoid any future breaking change where this supposed default could be changed. This approach introduces few benefits: + * Reduces the number of methods that refer to similar operation-dependent intents. E.g.: + * All of the following: + * `AsyncAPIDocument.channelsApplicationSubscribes()` + * `AsyncAPIDocument.channelsClientSubscribes()` + * Become: + * `AsyncAPIDocument.channelsSubscribes('')` + * Makes tools that contemplate both roles easily specify the role via a param. E.g.: + * https://github.com/asyncapi/java-spring-cloud-stream-template/blob/bfbb108f51b366ca7f7ed9f2df389cde40e380a0/filters/all.js#L460 + +### Parameters definitions + +- `` is either `application` or `client`. +- `` is a specific media type (e.g. `application/json`) +- `` is the name of the server. +- `` is the specific extension property (e.g. `x-test`) +- `` is the specific binding protocol (e.g. `AMQP`) +- `` is a property within the binding protocol. + +## Feedback + +* Do you have any extra intents we should add (initially)? + * Don't expect all intents to be included in the first iteration, you should "easily" see where other intents could be added. But remember this is just an initial version that shows the general approach. +* Do you like the setup/dislike the setup? Why? What can be improved? +* Any intents that are completely off? +* Other things? +* Can you come up with a better naming format then `Channel.operationIdForSubscribingClient()`? From 4307b76949db953482d5649b1377d254e6468bd6 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Thu, 25 Mar 2021 14:09:08 +0100 Subject: [PATCH 02/18] Removed feedback section --- docs/Intents.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/Intents.md b/docs/Intents.md index 6f16f08cf..698008c76 100644 --- a/docs/Intents.md +++ b/docs/Intents.md @@ -52,12 +52,3 @@ These are the intents together with the model they belong to. **(HELP NEEDED)** - `` is the specific extension property (e.g. `x-test`) - `` is the specific binding protocol (e.g. `AMQP`) - `` is a property within the binding protocol. - -## Feedback - -* Do you have any extra intents we should add (initially)? - * Don't expect all intents to be included in the first iteration, you should "easily" see where other intents could be added. But remember this is just an initial version that shows the general approach. -* Do you like the setup/dislike the setup? Why? What can be improved? -* Any intents that are completely off? -* Other things? -* Can you come up with a better naming format then `Channel.operationIdForSubscribingClient()`? From 7d1c09bad2920f1af851177347ac9dd7b9e97886 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Wed, 7 Apr 2021 13:52:30 +0200 Subject: [PATCH 03/18] Operation as an entity --- docs/API.md | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) diff --git a/docs/API.md b/docs/API.md index d5cbf0e19..25d955432 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,18 +1,27 @@ ### Root - AsyncAPIDocument +- `AsyncAPIDocument.applicationPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.applicationPublishableMessages()` : Message[] +- `AsyncAPIDocument.applicationPublishOperations()` : Operation[] +- `AsyncAPIDocument.applicationSubscribableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.applicationSubscribableMessages()` : Message[] +- `AsyncAPIDocument.applicationSubscribeOperations()` : Operation[] +- `AsyncAPIDocument.clientPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.clientPublishableMessages()` : Message[] +- `AsyncAPIDocument.clientPublishOperations()` : Operation[] +- `AsyncAPIDocument.clientSubscribableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.clientSubscribableMessages()` : Message[] +- `AsyncAPIDocument.clientSubscribeOperations()` : Operation[] +- `AsyncAPIDocument.messages([])` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.channels([])` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.operations([])` : Operation[] - `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) -- `AsyncAPIDocument.channels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) -- **(HELP NEEDED)** `AsyncAPIDocument.channelsSubscribes('')` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) -- **(HELP NEEDED)** `AsyncAPIDocument.channelsPublishes('')` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) -- **(HELP NEEDED)** `AsyncAPIDocument.isSubscribingToChannels('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) -- **(HELP NEEDED)** `AsyncAPIDocument.isPublishingToChannels('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) -- `AsyncAPIDocument.messages()` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.schemas()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.info()` : Info - `AsyncAPIDocument.json()` : string (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) - `AsyncAPIDocument.securitySchemes()` : SecurityScheme[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - ### Info - `Info.title()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) - `Info.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) @@ -25,26 +34,27 @@ ### SecurityScheme Empty for now. +### Operation +- `Operation.id()` : string +- `Operation.summary()` : string +- `Operation.messages()` : Message[] +- `Operation.channels()` : Channel[] +- `Operation.extension('')` : any +- `Operation.binding('', '')` : any + ### Channel - `Channel.path()` : string - `Channel.messages()` : Message[] -- **(HELP NEEDED)** `Channel.messagesPublishes('')` : Message[] -- **(HELP NEEDED)** `Channel.messagesSubscribes('')` : Message[] -- `Channel.isSubscribing('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) -- `Channel.isPublishing('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Channel.operations()` : Operation[] - `Channel.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Channel.extension('')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- **(HELP NEEDED)** `Channel.extensionForPublishing('', '')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- **(HELP NEEDED)** `Channel.extensionForSubscribing('', '')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) - `Channel.binding('', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- **(HELP NEEDED)** `Channel.bindingForSubscribing('', '', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- **(HELP NEEDED)** `Channel.bindingForPublishing('', ', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- **(HELP NEEDED)** `Channel.summaryForPublishing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) -- **(HELP NEEDED)** `Channel.summaryForSubscribing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Channel.parameters()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) -- **(HELP NEEDED)** `Channel.operationIdForPublishing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) -- **(HELP NEEDED)** `Channel.operationIdForSubscribing('')` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) ### Message - `Message.headers()` : Schema (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) -- `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) \ No newline at end of file +- `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Message.channels()` : Channel[] +- `Message.operations()` : Operation[] +- `Message.extension('')` : any +- `Message.binding('', '')` : any \ No newline at end of file From 71d0446d9ad692f6c5342647a7e0c0a8b61b1df2 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 12 Apr 2021 14:22:53 +0200 Subject: [PATCH 04/18] Added server and operation relationship --- docs/API.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/API.md b/docs/API.md index 25d955432..10de83921 100644 --- a/docs/API.md +++ b/docs/API.md @@ -30,6 +30,7 @@ ### Server - `Server.name()` : string - `Server.protocol()` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) +- `Server.operations()` : Operation[] ### SecurityScheme Empty for now. @@ -41,6 +42,8 @@ Empty for now. - `Operation.channels()` : Channel[] - `Operation.extension('')` : any - `Operation.binding('', '')` : any +- `Operation.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `Operation.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) ### Channel - `Channel.path()` : string From 83a79d2a23e80b041bda55f6a59df45455046e46 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 12 Apr 2021 14:23:32 +0200 Subject: [PATCH 05/18] Added message content type function --- docs/API.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index 10de83921..d1d0eb6f3 100644 --- a/docs/API.md +++ b/docs/API.md @@ -60,4 +60,5 @@ Empty for now. - `Message.channels()` : Channel[] - `Message.operations()` : Operation[] - `Message.extension('')` : any -- `Message.binding('', '')` : any \ No newline at end of file +- `Message.binding('', '')` : any +- `Message.contentType()` : string \ No newline at end of file From fd405b90fc95e406ab3a1470212ef6c570e88ecd Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 12 Apr 2021 14:25:01 +0200 Subject: [PATCH 06/18] Added operation type functions --- docs/API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/API.md b/docs/API.md index d1d0eb6f3..12ba2d328 100644 --- a/docs/API.md +++ b/docs/API.md @@ -44,7 +44,11 @@ Empty for now. - `Operation.binding('', '')` : any - `Operation.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `Operation.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - +- `Operation.isClientSubscribing()` : boolean +- `Operation.isClientPublishing()` : boolean +- `Operation.isApplicationSubscribing()` : boolean +- `Operation.isApplicationPublishing()` : boolean +- `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` ### Channel - `Channel.path()` : string - `Channel.messages()` : Message[] From 985c91fe9b5cd9f2b900b8aaffb14203983c4140 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 12 Apr 2021 14:25:37 +0200 Subject: [PATCH 07/18] Removed binding property argument --- docs/API.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/API.md b/docs/API.md index 12ba2d328..5ecfe7e54 100644 --- a/docs/API.md +++ b/docs/API.md @@ -41,7 +41,7 @@ Empty for now. - `Operation.messages()` : Message[] - `Operation.channels()` : Channel[] - `Operation.extension('')` : any -- `Operation.binding('', '')` : any +- `Operation.binding('')` : any - `Operation.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `Operation.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `Operation.isClientSubscribing()` : boolean @@ -49,13 +49,14 @@ Empty for now. - `Operation.isApplicationSubscribing()` : boolean - `Operation.isApplicationPublishing()` : boolean - `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` + ### Channel - `Channel.path()` : string - `Channel.messages()` : Message[] - `Channel.operations()` : Operation[] - `Channel.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Channel.extension('')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- `Channel.binding('', '')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) +- `Channel.binding('')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) - `Channel.parameters()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) ### Message @@ -64,5 +65,5 @@ Empty for now. - `Message.channels()` : Channel[] - `Message.operations()` : Operation[] - `Message.extension('')` : any -- `Message.binding('', '')` : any +- `Message.binding('')` : any - `Message.contentType()` : string \ No newline at end of file From 97339b79746a7ac37eff1ceccd25072b320616d2 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Mon, 12 Apr 2021 14:27:46 +0200 Subject: [PATCH 08/18] Added notice --- docs/Intents.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/Intents.md b/docs/Intents.md index 698008c76..6dc0b082c 100644 --- a/docs/Intents.md +++ b/docs/Intents.md @@ -1,3 +1,5 @@ +# NOTICE - This document is not yet up to date + # Intents As we see it we have two options/concepts we can follow in regards to how we structure intents. From 8981dbffe1b73adaedef2129280821c75295e068 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 15 Apr 2021 12:55:33 +0200 Subject: [PATCH 09/18] feat: add markdown-template required methods --- docs/API.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/docs/API.md b/docs/API.md index 5ecfe7e54..c3b4c03cf 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,3 +1,6 @@ +### All models (Base) +- `.hasExtension(key)` : boolean (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) +- `.extension(key)` : any (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) ### Root - AsyncAPIDocument - `AsyncAPIDocument.applicationPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) @@ -13,10 +16,12 @@ - `AsyncAPIDocument.clientSubscribableMessages()` : Message[] - `AsyncAPIDocument.clientSubscribeOperations()` : Operation[] - `AsyncAPIDocument.messages([])` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.hasChannels()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) - `AsyncAPIDocument.channels([])` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.operations([])` : Operation[] - `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) - `AsyncAPIDocument.schemas()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `AsyncAPIDocument.hasServers()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) - `AsyncAPIDocument.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.info()` : Info @@ -26,18 +31,41 @@ - `Info.title()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) - `Info.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Info.version()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) +- `Info.termsOfService()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L27) ### Server - `Server.name()` : string - `Server.protocol()` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Server.operations()` : Operation[] +- `Server.protocolVersion()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L27) +- `Server.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L28) +- `Server.variables()` : ServerVariable[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L37) +- `Server.security()` : ServerSecurity[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L38 and https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L73-L93) + +### ServerVariable +- `ServerVariable.hasDefaultValue()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.defaultValue()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.hasAllowedValues() boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.allowedValues()` : any[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.description() string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) + +### ServerSecurity +- `ServerSecurity.securityScheme()` : SecurityScheme (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `ServerSecurity.values()` : string[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) ### SecurityScheme -Empty for now. +- `SecurityScheme.type()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.in()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.scheme()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.bearerFormat()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) ### Operation - `Operation.id()` : string - `Operation.summary()` : string +- `Operation.hasDescription()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L69-L71) +- `Operation.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L69-L71) +- `Operation.hasMultipleMessages()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L74) - `Operation.messages()` : Message[] - `Operation.channels()` : Channel[] - `Operation.extension('')` : any @@ -51,19 +79,35 @@ Empty for now. - `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` ### Channel +- `Channel.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L26) - `Channel.path()` : string - `Channel.messages()` : Message[] - `Channel.operations()` : Operation[] +- `Channel.hasDescription()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L28) - `Channel.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Channel.extension('')` : any (outcome of comment(s): [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) - `Channel.binding('')` : any (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) -- `Channel.parameters()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) +- `Channel.hasParameters()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L34) +- `Channel.parameters()` : ChannelParameter[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961) and https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L34) + +### ChannelParameter +- `ChannelParameter.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L47) +- `ChannelParameter.schema()` : Schema (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L48) ### Message +- `Message.summary()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L11) +- `Message.hasDescription()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L16) +- `Message.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L18) +- `Message.examples()` : Object[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L65) +- `Message.hasTags()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L38) +- `Message.tags()` : Tag[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L41) - `Message.headers()` : Schema (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) - `Message.channels()` : Channel[] - `Message.operations()` : Operation[] - `Message.extension('')` : any - `Message.binding('')` : any -- `Message.contentType()` : string \ No newline at end of file +- `Message.contentType()` : string + +### Tag +- `Tag.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L52) From 2b25e5c09d9a49175a8acb70afaaf8104ec27665 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:27:30 +0200 Subject: [PATCH 10/18] Fix typos --- docs/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API.md b/docs/API.md index c3b4c03cf..03c2cffd1 100644 --- a/docs/API.md +++ b/docs/API.md @@ -45,9 +45,9 @@ ### ServerVariable - `ServerVariable.hasDefaultValue()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.defaultValue()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) -- `ServerVariable.hasAllowedValues() boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.hasAllowedValues()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.allowedValues()` : any[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) -- `ServerVariable.description() string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) ### ServerSecurity - `ServerSecurity.securityScheme()` : SecurityScheme (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) From 54ca971fb63000c7992ec2759184f0740f87c4e8 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:50:29 +0200 Subject: [PATCH 11/18] Constants for SecurityScheme .type() and .in() return values --- docs/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/API.md b/docs/API.md index 03c2cffd1..b5d3491b0 100644 --- a/docs/API.md +++ b/docs/API.md @@ -54,8 +54,8 @@ - `ServerSecurity.values()` : string[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) ### SecurityScheme -- `SecurityScheme.type()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) -- `SecurityScheme.in()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.type()` : Types (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.in()` : ApiKeyLocations (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.scheme()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.bearerFormat()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) From 8e8bc1109188c03fa3880165d3fdc69823fc70fb Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:58:28 +0200 Subject: [PATCH 12/18] Remove channel.name() in favor of channel.path() --- docs/API.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/API.md b/docs/API.md index b5d3491b0..2bb1222ff 100644 --- a/docs/API.md +++ b/docs/API.md @@ -79,8 +79,7 @@ - `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` ### Channel -- `Channel.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L26) -- `Channel.path()` : string +- `Channel.path()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L26) - `Channel.messages()` : Message[] - `Channel.operations()` : Operation[] - `Channel.hasDescription()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L28) From 8290c3a4d54950210590a31f6b611f97b18f3c20 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Fri, 16 Apr 2021 09:33:42 +0200 Subject: [PATCH 13/18] add missing ServerVariable.name() method --- docs/API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/API.md b/docs/API.md index 2bb1222ff..22afe74fa 100644 --- a/docs/API.md +++ b/docs/API.md @@ -43,6 +43,7 @@ - `Server.security()` : ServerSecurity[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L38 and https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L73-L93) ### ServerVariable +- `ServerVariable.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49) - `ServerVariable.hasDefaultValue()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.defaultValue()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.hasAllowedValues()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) From 97266f96441646be08bafdc99d6b098be30bf3af Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Fri, 16 Apr 2021 16:15:22 +0200 Subject: [PATCH 14/18] Modified intent description --- docs/Intents.md | 54 ++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 41 deletions(-) diff --git a/docs/Intents.md b/docs/Intents.md index 6dc0b082c..1fba75e7f 100644 --- a/docs/Intents.md +++ b/docs/Intents.md @@ -1,56 +1,28 @@ -# NOTICE - This document is not yet up to date - # Intents -As we see it we have two options/concepts we can follow in regards to how we structure intents. -1. **All intents under one roof** so everything flows through the root such as: `AsyncAPIDocument.extensionForChannelThatApplicationSubscribesTo('', '')` - -2. **Wrap intents in models**, to provide an independent concepts that will always exist regardless of the specification. - -Reason why we suggest to go with option 2 is: -- It is more maintainable, we would end up with an incomprehensible amount of intents in the same class, not to mention the length of the name for them. +The intents are wrapped in models, to provide independent concepts that will always exist regardless of the specification. The upsides to using this approach is: +- More maintainable. - When viewed from the tooling perspective these models would also make sense and make it iteratable. - To be consistent, so we do not reject intents on unclear rules making it confusing to understand. ## Models -These are following models which we have identified and suggest we stick to. +These are the intent models added to the parser +- **AsyncAPI**, the root of the structure. - **Message**, because message can exist without operation, and channels. -- **Channel**, the core model (almost) everything flows around +- **Channel**, describing a `topic`/`channel` message is transmitted over by some operation. +- **Operation**, describes the action to take on a channel with a message. - **Server**, you have to connect to something -- **Info**, defined information about your document -- **Schema**, JSON Schema draft 7, leave as is and don't create intents for it. -- **SecurityScheme**, does not have any intents tied to it at the moment, since we don't have a directly use-case/example. +- **Info**, defined information about your application. +- **Schema**, JSON Schema draft 7, left as is and don't have intents. +- **Tag**, meta data. +- **SecurityScheme**, for security specifications needed. ### Rules -To remove confusion on when something is a model and when it is not, where and when intents are added we have defined some rules for the models: -- Root level intents SHOULD never return properties of models but instead answer questions, return the model itself or a collection of models +To remove confusion on when something is a model and when it is not, where and when intents are added we have defined some rules: +- Root level intents (`AsyncAPI` model) SHOULD never return properties of models but instead answer questions, return the model itself or a collection of models - Reason why root level does not return properties, is because we need to limit the number of nested intents. - i.e. to avoid `AsyncAPIDocument.extensionForChannelThatApplicationSubscribesTo('', '')` - Models contain intents to return properties, answer questions, return other model or a collection of models. - Reason behind this is to segregate intents by responsibility. - Models are entity objects and should not be value objects - - So why are operation for example not an entity? Because we don't see the operation as needing an identity, it merely contains values we need associated with the Channel. - -## Initial intents and models -These are the intents together with the model they belong to. **(HELP NEEDED)** implies that we are unsure about the naming of the intent, especially since we are not native speakers. - -### Decisions - -* We decided to introduce the `role` parameter for intents that have a common implementation based on the combination of what we currently call operation type (`publish/subscribe`) plus the context or point of view of the current role (`Application/Client`). The parameter is mandatory to always make the user specify their role and avoid any future breaking change where this supposed default could be changed. This approach introduces few benefits: - * Reduces the number of methods that refer to similar operation-dependent intents. E.g.: - * All of the following: - * `AsyncAPIDocument.channelsApplicationSubscribes()` - * `AsyncAPIDocument.channelsClientSubscribes()` - * Become: - * `AsyncAPIDocument.channelsSubscribes('')` - * Makes tools that contemplate both roles easily specify the role via a param. E.g.: - * https://github.com/asyncapi/java-spring-cloud-stream-template/blob/bfbb108f51b366ca7f7ed9f2df389cde40e380a0/filters/all.js#L460 - -### Parameters definitions - -- `` is either `application` or `client`. -- `` is a specific media type (e.g. `application/json`) -- `` is the name of the server. -- `` is the specific extension property (e.g. `x-test`) -- `` is the specific binding protocol (e.g. `AMQP`) -- `` is a property within the binding protocol. + - Does it make sense conceptually independently from the spec? From 6df9aa3e85aacbd00c103b00971e0dc4817b72ec Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 20 Apr 2021 16:20:20 +0200 Subject: [PATCH 15/18] docs: add missing functions --- docs/API.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/API.md b/docs/API.md index 22afe74fa..31c71fe25 100644 --- a/docs/API.md +++ b/docs/API.md @@ -38,9 +38,11 @@ - `Server.protocol()` : string (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) - `Server.operations()` : Operation[] - `Server.protocolVersion()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L27) +- `Server.hasDescription()` : boolean - `Server.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L28) - `Server.variables()` : ServerVariable[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L37) - `Server.security()` : ServerSecurity[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L38 and https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L73-L93) +- `Server.binding()` : any ### ServerVariable - `ServerVariable.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49) @@ -48,7 +50,9 @@ - `ServerVariable.defaultValue()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.hasAllowedValues()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) - `ServerVariable.allowedValues()` : any[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.hasDescription()` : boolean - `ServerVariable.description()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js/#L49-L54) +- `ServerVariable.examples()` : string[] ### ServerSecurity - `ServerSecurity.securityScheme()` : SecurityScheme (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) @@ -60,6 +64,10 @@ - `SecurityScheme.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.scheme()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.bearerFormat()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) +- `SecurityScheme.hasDescription()` : boolean +- `SecurityScheme.description()` : string +- `SecurityScheme.flows()` : OauthFlows +- `SecurityScheme.openIdConnectUrl()` : string ### Operation - `Operation.id()` : string @@ -78,6 +86,10 @@ - `Operation.isApplicationSubscribing()` : boolean - `Operation.isApplicationPublishing()` : boolean - `Operation.type()` : string - Returns either `ClientSubscribing`, `ClientPublishing`, `ApplicationSubscribing`, `ApplicationPublishing` +- `Operation.hasExternalDocs()` : boolean +- `Operation.externalDocs()` : ExternalDocumentation +- `Operation.hasTags()` : boolean +- `Operation.tags()` : Tag[] ### Channel - `Channel.path()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Channels.js#L26) @@ -111,3 +123,7 @@ ### Tag - `Tag.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L52) +- `Tag.hasDescription()` : string +- `Tag.description()` : string +- `Tag.hasExternalDocs()` : boolean +- `Tag.externalDocs` : ExternalDocumentation From d6ceba730bc3013887356081519d539cb5cb0421 Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 21 Apr 2021 20:03:41 +0200 Subject: [PATCH 16/18] Added semi generated API document --- docs/API.md | 24 +++++- docs/generated_API.md | 187 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 docs/generated_API.md diff --git a/docs/API.md b/docs/API.md index 31c71fe25..e0ef3f7cc 100644 --- a/docs/API.md +++ b/docs/API.md @@ -1,8 +1,21 @@ + ### All models (Base) - `.hasExtension(key)` : boolean (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) - `.extension(key)` : any (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) +- `.json()` : string (outcome of https://github.com/asyncapi/parser-js/blob/b06e44f519f31fcda11336eb6d84aaf1d4630366/lib/parser.js#L129) ### Root - AsyncAPIDocument + +- `AsyncAPIDocument.version()` : string +- `AsyncAPIDocument.hasId()` : boolean +- `AsyncAPIDocument.id()` : string|undefined +- `AsyncAPIDocument.hasDefaultContentType()` : boolean +- `AsyncAPIDocument.defaultContentType()` : string|undefined +- `AsyncAPIDocument.hasExternalDocs()` : boolean +- `AsyncAPIDocument.externalDocs()` : string|undefined +- `AsyncAPIDocument.hasTags()` : boolean +- `AsyncAPIDocument.tags()` : IntentTag|undefined +- `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) - `AsyncAPIDocument.applicationPublishableChannels()` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.applicationPublishableMessages()` : Message[] - `AsyncAPIDocument.applicationPublishOperations()` : Operation[] @@ -18,15 +31,14 @@ - `AsyncAPIDocument.messages([])` : Message[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.hasChannels()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) - `AsyncAPIDocument.channels([])` : Channel[] (outcome of comment(s): [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) -- `AsyncAPIDocument.operations([])` : Operation[] -- `AsyncAPIDocument.hasContentType('')` : boolean (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319)) +- `AsyncAPIDocument.operations([])` : Operation[] - `AsyncAPIDocument.schemas()` : Schema[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.hasServers()` : boolean (outcome of https://github.com/asyncapi/markdown-template/blob/master/template/asyncapi.js#L32) - `AsyncAPIDocument.servers()` : Server[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.server('')` : Server (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) - `AsyncAPIDocument.info()` : Info -- `AsyncAPIDocument.json()` : string (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) - `AsyncAPIDocument.securitySchemes()` : SecurityScheme[] (outcome of comment(s): [800935961](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800935961)) + ### Info - `Info.title()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407), [800963792](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800963792)) - `Info.description()` : string (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596), [800282407](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-800282407)) @@ -55,9 +67,12 @@ - `ServerVariable.examples()` : string[] ### ServerSecurity +- `ServerSecurity.hasExtension()` : boolean +- `ServerSecurity.extension()` : any|undefined - `ServerSecurity.securityScheme()` : SecurityScheme (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `ServerSecurity.values()` : string[] (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) + ### SecurityScheme - `SecurityScheme.type()` : Types (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) - `SecurityScheme.in()` : ApiKeyLocations (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Servers.js#L75-L80) @@ -117,13 +132,14 @@ - `Message.payload()` : Schema (outcome of comment(s): [799481319](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799481319), [799598596](https://github.com/asyncapi/shape-up-process/issues/84#issuecomment-799598596)) - `Message.channels()` : Channel[] - `Message.operations()` : Operation[] -- `Message.extension('')` : any - `Message.binding('')` : any - `Message.contentType()` : string + ### Tag - `Tag.name()` : string (outcome of https://github.com/asyncapi/markdown-template/blob/master/components/Message.js#L52) - `Tag.hasDescription()` : string - `Tag.description()` : string - `Tag.hasExternalDocs()` : boolean - `Tag.externalDocs` : ExternalDocumentation + diff --git a/docs/generated_API.md b/docs/generated_API.md new file mode 100644 index 000000000..3575f870f --- /dev/null +++ b/docs/generated_API.md @@ -0,0 +1,187 @@ +Missing: +- hasContentType(args) +- hasChannels +* [.IntentAsyncAPIDocument](#module_@asyncapi/parser+IntentAsyncAPIDocument) ⇐ IntentBase + * [.version()](#module_@asyncapi/parser+IntentAsyncAPIDocument+version) ⇒ string + * [.hasId()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasId) ⇒ boolean + * [.id()](#module_@asyncapi/parser+IntentAsyncAPIDocument+id) ⇒ string \| undefined + * [.hasDefaultContentType()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasDefaultContentType) ⇒ boolean + * [.defaultContentType()](#module_@asyncapi/parser+IntentAsyncAPIDocument+defaultContentType) ⇒ string \| undefined + * [.info()](#module_@asyncapi/parser+IntentAsyncAPIDocument+info) ⇒ IntentInfo + * [.applicationPublishableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishableChannels) ⇒ Array.<IntentChannel> + * [.applicationSubscribableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribableChannels) ⇒ Array.<IntentChannel> + * [.clientPublishableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishableChannels) ⇒ Array.<IntentChannel> + * [.clientSubscribableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribableChannels) ⇒ Array.<IntentChannel> + * [.channels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+channels) ⇒ Array.<IntentChannel> + * [.applicationPublishableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishableMessages) ⇒ Array.<IntentMessage> + * [.applicationSubscribableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribableMessages) ⇒ Array.<IntentMessage> + * [.clientPublishableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishableMessages) ⇒ Array.<IntentMessage> + * [.clientSubscribableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribableMessages) ⇒ Array.<IntentMessage> + * [.messages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+messages) ⇒ Array.<IntentMessage> + * [.applicationPublishOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishOperations) ⇒ Array.<IntentOperation> + * [.applicationSubscribeOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribeOperations) ⇒ Array.<IntentOperation> + * [.clientPublishOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishOperations) ⇒ Array.<IntentOperation> + * [.clientSubscribeOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribeOperations) ⇒ Array.<IntentOperation> + * [.operations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+operations) ⇒ Array.<IntentOperation> + * [.schemas()](#module_@asyncapi/parser+IntentAsyncAPIDocument+schemas) ⇒ Array.<Schema> + * [.hasServers()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasServers) ⇒ boolean + * [.servers()](#module_@asyncapi/parser+IntentAsyncAPIDocument+servers) ⇒ Array.<IntentServer> + * [.server()](#module_@asyncapi/parser+IntentAsyncAPIDocument+server) ⇒ IntentServer \| undefined + * [.securitySchemes()](#module_@asyncapi/parser+IntentAsyncAPIDocument+securitySchemes) ⇒ Array.<SecurityScheme> + * [.hasExternalDocs()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasExternalDocs) ⇒ boolean + * [.externalDocs()](#module_@asyncapi/parser+IntentAsyncAPIDocument+externalDocs) ⇒ IntentExternalDocument \| undefined + * [.hasTags()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasTags) ⇒ boolean + * [.tags()](#module_@asyncapi/parser+IntentAsyncAPIDocument+tags) ⇒ Array.<IntentTag> \| undefined +* [.IntentBase](#module_@asyncapi/parser+IntentBase) + * [.json()](#module_@asyncapi/parser+IntentBase+json) ⇒ any + * [.hasExtension()](#module_@asyncapi/parser+IntentBase+hasExtension) ⇒ boolean + * [.extension()](#module_@asyncapi/parser+IntentBase+extension) ⇒ any \| undefined +* [.IntentChannel](#module_@asyncapi/parser+IntentChannel) ⇐ IntentBase + * [.operations()](#module_@asyncapi/parser+IntentChannel+operations) ⇒ Array.<IntentOperation> + * [.path()](#module_@asyncapi/parser+IntentChannel+path) ⇒ string + * [.messages()](#module_@asyncapi/parser+IntentChannel+messages) ⇒ Array.<IntentMessage> + * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentChannel+hasBinding) ⇒ boolean + * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentChannel+binding) ⇒ any \| undefined + * [.hasParameters()](#module_@asyncapi/parser+IntentChannel+hasParameters) ⇒ boolean + * [.parameters()](#module_@asyncapi/parser+IntentChannel+parameters) ⇒ Array.<Schema> \| undefined + * [.hasDescription()](#module_@asyncapi/parser+IntentChannel+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentChannel+description) ⇒ string \| undefined +* [.IntentContact](#module_@asyncapi/parser+IntentContact) ⇐ IntentBase + * [.hasName()](#module_@asyncapi/parser+IntentContact+hasName) ⇒ boolean + * [.name()](#module_@asyncapi/parser+IntentContact+name) ⇒ string \| undefined + * [.hasUrl()](#module_@asyncapi/parser+IntentContact+hasUrl) ⇒ boolean + * [.url()](#module_@asyncapi/parser+IntentContact+url) ⇒ string \| undefined + * [.hasEmail()](#module_@asyncapi/parser+IntentContact+hasEmail) ⇒ boolean + * [.email()](#module_@asyncapi/parser+IntentContact+email) ⇒ string \| undefined +* [.IntentCorrelationId](#module_@asyncapi/parser+IntentCorrelationId) ⇐ IntentBase + * [.hasDescription()](#module_@asyncapi/parser+IntentCorrelationId+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentCorrelationId+description) ⇒ string \| undefined + * [.hasLocation()](#module_@asyncapi/parser+IntentCorrelationId+hasLocation) ⇒ boolean + * [.location()](#module_@asyncapi/parser+IntentCorrelationId+location) ⇒ string \| undefined +* [.IntentExternalDocument](#module_@asyncapi/parser+IntentExternalDocument) ⇐ IntentBase + * [.hasDescription()](#module_@asyncapi/parser+IntentExternalDocument+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentExternalDocument+description) ⇒ string \| undefined + * [.hasUrl()](#module_@asyncapi/parser+IntentExternalDocument+hasUrl) ⇒ boolean + * [.url()](#module_@asyncapi/parser+IntentExternalDocument+url) ⇒ string \| undefined +* [.IntentInfo](#module_@asyncapi/parser+IntentInfo) ⇐ IntentBase + * [.title()](#module_@asyncapi/parser+IntentInfo+title) ⇒ string + * [.version()](#module_@asyncapi/parser+IntentInfo+version) ⇒ string + * [.hasDescription()](#module_@asyncapi/parser+IntentInfo+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentInfo+description) ⇒ string \| undefined + * [.hasTermsOfService()](#module_@asyncapi/parser+IntentInfo+hasTermsOfService) ⇒ boolean + * [.termsOfService()](#module_@asyncapi/parser+IntentInfo+termsOfService) ⇒ string \| undefined + * [.hasContact()](#module_@asyncapi/parser+IntentInfo+hasContact) ⇒ boolean + * [.contact()](#module_@asyncapi/parser+IntentInfo+contact) ⇒ IntentContact \| undefined + * [.hasLicense()](#module_@asyncapi/parser+IntentInfo+hasLicense) ⇒ boolean + * [.license()](#module_@asyncapi/parser+IntentInfo+license) ⇒ IntentLicense \| undefined +* [.IntentLicense](#module_@asyncapi/parser+IntentLicense) ⇐ IntentBase + * [.name()](#module_@asyncapi/parser+IntentLicense+name) ⇒ string + * [.hasUrl()](#module_@asyncapi/parser+IntentLicense+hasUrl) ⇒ boolean + * [.url()](#module_@asyncapi/parser+IntentLicense+url) ⇒ string \| undefined +* [.IntentMessage](#module_@asyncapi/parser+IntentMessage) ⇐ IntentBase + * [.uid()](#module_@asyncapi/parser+IntentMessage+uid) ⇒ string + * [.payload()](#module_@asyncapi/parser+IntentMessage+payload) ⇒ Schema + * [.channels()](#module_@asyncapi/parser+IntentMessage+channels) ⇒ Array.<IntentChannel> + * [.operations()](#module_@asyncapi/parser+IntentMessage+operations) ⇒ Array.<IntentOperation> + * [.hasName()](#module_@asyncapi/parser+IntentMessage+hasName) ⇒ boolean + * [.name()](#module_@asyncapi/parser+IntentMessage+name) ⇒ string \| undefined + * [.hasSummary()](#module_@asyncapi/parser+IntentMessage+hasSummary) ⇒ boolean + * [.summary()](#module_@asyncapi/parser+IntentMessage+summary) ⇒ string \| undefined + * [.hasTitle()](#module_@asyncapi/parser+IntentMessage+hasTitle) ⇒ boolean + * [.title()](#module_@asyncapi/parser+IntentMessage+title) ⇒ string \| undefined + * [.hasHeaders()](#module_@asyncapi/parser+IntentMessage+hasHeaders) ⇒ boolean + * [.headers()](#module_@asyncapi/parser+IntentMessage+headers) ⇒ Schema \| undefined + * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentMessage+hasBinding) ⇒ boolean + * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentMessage+binding) ⇒ any \| undefined + * [.contentType()](#module_@asyncapi/parser+IntentMessage+contentType) ⇒ string + * [.examples()](#module_@asyncapi/parser+IntentMessage+examples) ⇒ Map.<string, any> + * [.hasCorrelationId()](#module_@asyncapi/parser+IntentMessage+hasCorrelationId) ⇒ boolean + * [.correlationId()](#module_@asyncapi/parser+IntentMessage+correlationId) ⇒ IntentCorrelationId \| undefined + * [.hasTags()](#module_@asyncapi/parser+IntentMessage+hasTags) ⇒ boolean + * [.tags()](#module_@asyncapi/parser+IntentMessage+tags) ⇒ Array.<IntentTag> \| undefined + * [.hasDescription()](#module_@asyncapi/parser+IntentMessage+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentMessage+description) ⇒ string \| undefined +* [.IntentOAuthFlow](#module_@asyncapi/parser+IntentOAuthFlow) ⇐ Base + * [.authorizationUrl()](#module_@asyncapi/parser+IntentOAuthFlow+authorizationUrl) ⇒ string \| undefined + * [.tokenUrl()](#module_@asyncapi/parser+IntentOAuthFlow+tokenUrl) ⇒ string \| undefined + * [.hasRefreshUrl()](#module_@asyncapi/parser+IntentOAuthFlow+hasRefreshUrl) ⇒ boolean + * [.refreshUrl()](#module_@asyncapi/parser+IntentOAuthFlow+refreshUrl) ⇒ string \| undefined + * [.scopes()](#module_@asyncapi/parser+IntentOAuthFlow+scopes) ⇒ Object.<string, string> \| undefined +* [.IntentOAuthFlows](#module_@asyncapi/parser+IntentOAuthFlows) ⇐ IntentBase + * [.hasImplicit()](#module_@asyncapi/parser+IntentOAuthFlows+hasImplicit) ⇒ boolean + * [.implicit()](#module_@asyncapi/parser+IntentOAuthFlows+implicit) ⇒ IntentOAuthFlow \| undefined + * [.hasPassword()](#module_@asyncapi/parser+IntentOAuthFlows+hasPassword) ⇒ boolean + * [.password()](#module_@asyncapi/parser+IntentOAuthFlows+password) ⇒ IntentOAuthFlow \| undefined + * [.hasClientCredentials()](#module_@asyncapi/parser+IntentOAuthFlows+hasClientCredentials) ⇒ boolean + * [.clientCredentials()](#module_@asyncapi/parser+IntentOAuthFlows+clientCredentials) ⇒ IntentOAuthFlow \| undefined + * [.hasAuthorizationCode()](#module_@asyncapi/parser+IntentOAuthFlows+hasAuthorizationCode) ⇒ boolean + * [.authorizationCode()](#module_@asyncapi/parser+IntentOAuthFlows+authorizationCode) ⇒ IntentOAuthFlow \| undefined +* [.IntentOperation](#module_@asyncapi/parser+IntentOperation) ⇐ IntentBase + * [.id()](#module_@asyncapi/parser+IntentOperation+id) ⇒ string + * [.hasDescription()](#module_@asyncapi/parser+IntentOperation+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentOperation+description) ⇒ string \| undefined + * [.hasSummary()](#module_@asyncapi/parser+IntentOperation+hasSummary) ⇒ boolean + * [.summary()](#module_@asyncapi/parser+IntentOperation+summary) ⇒ string \| undefined + * [.hasMultipleMessages()](#module_@asyncapi/parser+IntentOperation+hasMultipleMessages) ⇒ boolean + * [.messages()](#module_@asyncapi/parser+IntentOperation+messages) ⇒ Array.<IntentMessage> + * [.channels()](#module_@asyncapi/parser+IntentOperation+channels) ⇒ Array.<IntentChannel> + * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentOperation+hasBinding) ⇒ boolean + * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentOperation+binding) ⇒ any \| undefined + * [.servers()](#module_@asyncapi/parser+IntentOperation+servers) ⇒ Array.<IntentServer> + * [.server()](#module_@asyncapi/parser+IntentOperation+server) ⇒ IntentServer + * [.isClientSubscribing()](#module_@asyncapi/parser+IntentOperation+isClientSubscribing) ⇒ boolean + * [.isClientPublishing()](#module_@asyncapi/parser+IntentOperation+isClientPublishing) ⇒ boolean + * [.isApplicationSubscribing()](#module_@asyncapi/parser+IntentOperation+isApplicationSubscribing) ⇒ boolean + * [.isApplicationPublishing()](#module_@asyncapi/parser+IntentOperation+isApplicationPublishing) ⇒ boolean + * [.type()](#module_@asyncapi/parser+IntentOperation+type) ⇒ [Types](#Types) + * [.hasExternalDocs()](#module_@asyncapi/parser+IntentOperation+hasExternalDocs) ⇒ boolean + * [.externalDocs()](#module_@asyncapi/parser+IntentOperation+externalDocs) ⇒ IntentExternalDocument \| undefined + * [.hasTags()](#module_@asyncapi/parser+IntentOperation+hasTags) ⇒ boolean + * [.tags()](#module_@asyncapi/parser+IntentOperation+tags) ⇒ Array.<IntentTag> +* [.IntentSecurityScheme](#module_@asyncapi/parser+IntentSecurityScheme) ⇐ IntentBase + * [.type()](#module_@asyncapi/parser+IntentSecurityScheme+type) ⇒ [Types](#Types) + * [.name()](#module_@asyncapi/parser+IntentSecurityScheme+name) ⇒ string + * [.in()](#module_@asyncapi/parser+IntentSecurityScheme+in) ⇒ [ApiKeyLocations](#ApiKeyLocations) + * [.hasSchema()](#module_@asyncapi/parser+IntentSecurityScheme+hasSchema) ⇒ boolean + * [.scheme()](#module_@asyncapi/parser+IntentSecurityScheme+scheme) ⇒ string \| undefined + * [.hasBearerFormat()](#module_@asyncapi/parser+IntentSecurityScheme+hasBearerFormat) ⇒ boolean + * [.bearerFormat()](#module_@asyncapi/parser+IntentSecurityScheme+bearerFormat) ⇒ string \| undefined + * [.hasDescription()](#module_@asyncapi/parser+IntentSecurityScheme+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentSecurityScheme+description) ⇒ string + * [.flows()](#module_@asyncapi/parser+IntentSecurityScheme+flows) ⇒ IntentOAuthFlows + * [.openIdConnectUrl()](#module_@asyncapi/parser+IntentSecurityScheme+openIdConnectUrl) ⇒ string +* [.IntentServerSecurity](#module_@asyncapi/parser+IntentServerSecurity) ⇐ IntentBase + * [.securityScheme()](#module_@asyncapi/parser+IntentServerSecurity+securityScheme) ⇒ IntentSecurityScheme + * [.values()](#module_@asyncapi/parser+IntentServerSecurity+values) ⇒ Array.<string> +* [.IntentServerVariable](#module_@asyncapi/parser+IntentServerVariable) ⇐ IntentBase + * [.hasName()](#module_@asyncapi/parser+IntentServerVariable+hasName) ⇒ boolean + * [.name()](#module_@asyncapi/parser+IntentServerVariable+name) ⇒ string \| undefined + * [.hasDescription()](#module_@asyncapi/parser+IntentServerVariable+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentServerVariable+description) ⇒ string \| undefined + * [.hasAllowedValues()](#module_@asyncapi/parser+IntentServerVariable+hasAllowedValues) ⇒ boolean + * [.allowedValues()](#module_@asyncapi/parser+IntentServerVariable+allowedValues) ⇒ Array.<any> + * [.hasDefaultValue()](#module_@asyncapi/parser+IntentServerVariable+hasDefaultValue) ⇒ boolean + * [.defaultValue()](#module_@asyncapi/parser+IntentServerVariable+defaultValue) ⇒ string \| undefined + * [.examples()](#module_@asyncapi/parser+IntentServerVariable+examples) ⇒ Array.<string> +* [.IntentServer](#module_@asyncapi/parser+IntentServer) ⇐ IntentBase + * [.hasName()](#module_@asyncapi/parser+IntentServer+hasName) ⇒ boolean + * [.name()](#module_@asyncapi/parser+IntentServer+name) ⇒ string \| undefined + * [.hasProtocol()](#module_@asyncapi/parser+IntentServer+hasProtocol) ⇒ boolean + * [.protocol()](#module_@asyncapi/parser+IntentServer+protocol) ⇒ string \| undefined + * [.hasUrl()](#module_@asyncapi/parser+IntentServer+hasUrl) ⇒ boolean + * [.url()](#module_@asyncapi/parser+IntentServer+url) ⇒ string \| undefined + * [.operations()](#module_@asyncapi/parser+IntentServer+operations) ⇒ Array.<IntentOperation> + * [.variables()](#module_@asyncapi/parser+IntentServer+variables) ⇒ Array.<IntentServerVariable> + * [.security()](#module_@asyncapi/parser+IntentServer+security) ⇒ Array.<IntentServerSecurity> + * [.hasProtocolVersion()](#module_@asyncapi/parser+IntentServer+hasProtocolVersion) ⇒ boolean + * [.protocolVersion()](#module_@asyncapi/parser+IntentServer+protocolVersion) ⇒ string \| undefined + * [.hasDescription()](#module_@asyncapi/parser+IntentServer+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentServer+description) ⇒ string \| undefined + * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentServer+hasBinding) ⇒ boolean + * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentServer+binding) ⇒ any \| undefined +* [.IntentTag](#module_@asyncapi/parser+IntentTag) ⇐ IntentBase + * [.name()](#module_@asyncapi/parser+IntentTag+name) ⇒ string + * [.hasDescription()](#module_@asyncapi/parser+IntentTag+hasDescription) ⇒ boolean + * [.description()](#module_@asyncapi/parser+IntentTag+description) ⇒ string \| undefined + * [.hasExternalDocs()](#module_@asyncapi/parser+IntentTag+hasExternalDocs) ⇒ boolean + * [.externalDocs()](#module_@asyncapi/parser+IntentTag+externalDocs) ⇒ IntentExternalDocument \| undefined \ No newline at end of file From 306af27a7e113afa200243501959238c297eca0d Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Wed, 21 Apr 2021 20:15:31 +0200 Subject: [PATCH 17/18] Updated layout --- docs/generated_API.md | 372 +++++++++++++++++++++--------------------- 1 file changed, 185 insertions(+), 187 deletions(-) diff --git a/docs/generated_API.md b/docs/generated_API.md index 3575f870f..7e210a6ce 100644 --- a/docs/generated_API.md +++ b/docs/generated_API.md @@ -1,187 +1,185 @@ -Missing: -- hasContentType(args) -- hasChannels -* [.IntentAsyncAPIDocument](#module_@asyncapi/parser+IntentAsyncAPIDocument) ⇐ IntentBase - * [.version()](#module_@asyncapi/parser+IntentAsyncAPIDocument+version) ⇒ string - * [.hasId()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasId) ⇒ boolean - * [.id()](#module_@asyncapi/parser+IntentAsyncAPIDocument+id) ⇒ string \| undefined - * [.hasDefaultContentType()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasDefaultContentType) ⇒ boolean - * [.defaultContentType()](#module_@asyncapi/parser+IntentAsyncAPIDocument+defaultContentType) ⇒ string \| undefined - * [.info()](#module_@asyncapi/parser+IntentAsyncAPIDocument+info) ⇒ IntentInfo - * [.applicationPublishableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishableChannels) ⇒ Array.<IntentChannel> - * [.applicationSubscribableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribableChannels) ⇒ Array.<IntentChannel> - * [.clientPublishableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishableChannels) ⇒ Array.<IntentChannel> - * [.clientSubscribableChannels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribableChannels) ⇒ Array.<IntentChannel> - * [.channels()](#module_@asyncapi/parser+IntentAsyncAPIDocument+channels) ⇒ Array.<IntentChannel> - * [.applicationPublishableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishableMessages) ⇒ Array.<IntentMessage> - * [.applicationSubscribableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribableMessages) ⇒ Array.<IntentMessage> - * [.clientPublishableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishableMessages) ⇒ Array.<IntentMessage> - * [.clientSubscribableMessages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribableMessages) ⇒ Array.<IntentMessage> - * [.messages()](#module_@asyncapi/parser+IntentAsyncAPIDocument+messages) ⇒ Array.<IntentMessage> - * [.applicationPublishOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationPublishOperations) ⇒ Array.<IntentOperation> - * [.applicationSubscribeOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+applicationSubscribeOperations) ⇒ Array.<IntentOperation> - * [.clientPublishOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientPublishOperations) ⇒ Array.<IntentOperation> - * [.clientSubscribeOperations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+clientSubscribeOperations) ⇒ Array.<IntentOperation> - * [.operations()](#module_@asyncapi/parser+IntentAsyncAPIDocument+operations) ⇒ Array.<IntentOperation> - * [.schemas()](#module_@asyncapi/parser+IntentAsyncAPIDocument+schemas) ⇒ Array.<Schema> - * [.hasServers()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasServers) ⇒ boolean - * [.servers()](#module_@asyncapi/parser+IntentAsyncAPIDocument+servers) ⇒ Array.<IntentServer> - * [.server()](#module_@asyncapi/parser+IntentAsyncAPIDocument+server) ⇒ IntentServer \| undefined - * [.securitySchemes()](#module_@asyncapi/parser+IntentAsyncAPIDocument+securitySchemes) ⇒ Array.<SecurityScheme> - * [.hasExternalDocs()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+IntentAsyncAPIDocument+externalDocs) ⇒ IntentExternalDocument \| undefined - * [.hasTags()](#module_@asyncapi/parser+IntentAsyncAPIDocument+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+IntentAsyncAPIDocument+tags) ⇒ Array.<IntentTag> \| undefined -* [.IntentBase](#module_@asyncapi/parser+IntentBase) - * [.json()](#module_@asyncapi/parser+IntentBase+json) ⇒ any - * [.hasExtension()](#module_@asyncapi/parser+IntentBase+hasExtension) ⇒ boolean - * [.extension()](#module_@asyncapi/parser+IntentBase+extension) ⇒ any \| undefined -* [.IntentChannel](#module_@asyncapi/parser+IntentChannel) ⇐ IntentBase - * [.operations()](#module_@asyncapi/parser+IntentChannel+operations) ⇒ Array.<IntentOperation> - * [.path()](#module_@asyncapi/parser+IntentChannel+path) ⇒ string - * [.messages()](#module_@asyncapi/parser+IntentChannel+messages) ⇒ Array.<IntentMessage> - * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentChannel+hasBinding) ⇒ boolean - * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentChannel+binding) ⇒ any \| undefined - * [.hasParameters()](#module_@asyncapi/parser+IntentChannel+hasParameters) ⇒ boolean - * [.parameters()](#module_@asyncapi/parser+IntentChannel+parameters) ⇒ Array.<Schema> \| undefined - * [.hasDescription()](#module_@asyncapi/parser+IntentChannel+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentChannel+description) ⇒ string \| undefined -* [.IntentContact](#module_@asyncapi/parser+IntentContact) ⇐ IntentBase - * [.hasName()](#module_@asyncapi/parser+IntentContact+hasName) ⇒ boolean - * [.name()](#module_@asyncapi/parser+IntentContact+name) ⇒ string \| undefined - * [.hasUrl()](#module_@asyncapi/parser+IntentContact+hasUrl) ⇒ boolean - * [.url()](#module_@asyncapi/parser+IntentContact+url) ⇒ string \| undefined - * [.hasEmail()](#module_@asyncapi/parser+IntentContact+hasEmail) ⇒ boolean - * [.email()](#module_@asyncapi/parser+IntentContact+email) ⇒ string \| undefined -* [.IntentCorrelationId](#module_@asyncapi/parser+IntentCorrelationId) ⇐ IntentBase - * [.hasDescription()](#module_@asyncapi/parser+IntentCorrelationId+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentCorrelationId+description) ⇒ string \| undefined - * [.hasLocation()](#module_@asyncapi/parser+IntentCorrelationId+hasLocation) ⇒ boolean - * [.location()](#module_@asyncapi/parser+IntentCorrelationId+location) ⇒ string \| undefined -* [.IntentExternalDocument](#module_@asyncapi/parser+IntentExternalDocument) ⇐ IntentBase - * [.hasDescription()](#module_@asyncapi/parser+IntentExternalDocument+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentExternalDocument+description) ⇒ string \| undefined - * [.hasUrl()](#module_@asyncapi/parser+IntentExternalDocument+hasUrl) ⇒ boolean - * [.url()](#module_@asyncapi/parser+IntentExternalDocument+url) ⇒ string \| undefined -* [.IntentInfo](#module_@asyncapi/parser+IntentInfo) ⇐ IntentBase - * [.title()](#module_@asyncapi/parser+IntentInfo+title) ⇒ string - * [.version()](#module_@asyncapi/parser+IntentInfo+version) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+IntentInfo+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentInfo+description) ⇒ string \| undefined - * [.hasTermsOfService()](#module_@asyncapi/parser+IntentInfo+hasTermsOfService) ⇒ boolean - * [.termsOfService()](#module_@asyncapi/parser+IntentInfo+termsOfService) ⇒ string \| undefined - * [.hasContact()](#module_@asyncapi/parser+IntentInfo+hasContact) ⇒ boolean - * [.contact()](#module_@asyncapi/parser+IntentInfo+contact) ⇒ IntentContact \| undefined - * [.hasLicense()](#module_@asyncapi/parser+IntentInfo+hasLicense) ⇒ boolean - * [.license()](#module_@asyncapi/parser+IntentInfo+license) ⇒ IntentLicense \| undefined -* [.IntentLicense](#module_@asyncapi/parser+IntentLicense) ⇐ IntentBase - * [.name()](#module_@asyncapi/parser+IntentLicense+name) ⇒ string - * [.hasUrl()](#module_@asyncapi/parser+IntentLicense+hasUrl) ⇒ boolean - * [.url()](#module_@asyncapi/parser+IntentLicense+url) ⇒ string \| undefined -* [.IntentMessage](#module_@asyncapi/parser+IntentMessage) ⇐ IntentBase - * [.uid()](#module_@asyncapi/parser+IntentMessage+uid) ⇒ string - * [.payload()](#module_@asyncapi/parser+IntentMessage+payload) ⇒ Schema - * [.channels()](#module_@asyncapi/parser+IntentMessage+channels) ⇒ Array.<IntentChannel> - * [.operations()](#module_@asyncapi/parser+IntentMessage+operations) ⇒ Array.<IntentOperation> - * [.hasName()](#module_@asyncapi/parser+IntentMessage+hasName) ⇒ boolean - * [.name()](#module_@asyncapi/parser+IntentMessage+name) ⇒ string \| undefined - * [.hasSummary()](#module_@asyncapi/parser+IntentMessage+hasSummary) ⇒ boolean - * [.summary()](#module_@asyncapi/parser+IntentMessage+summary) ⇒ string \| undefined - * [.hasTitle()](#module_@asyncapi/parser+IntentMessage+hasTitle) ⇒ boolean - * [.title()](#module_@asyncapi/parser+IntentMessage+title) ⇒ string \| undefined - * [.hasHeaders()](#module_@asyncapi/parser+IntentMessage+hasHeaders) ⇒ boolean - * [.headers()](#module_@asyncapi/parser+IntentMessage+headers) ⇒ Schema \| undefined - * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentMessage+hasBinding) ⇒ boolean - * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentMessage+binding) ⇒ any \| undefined - * [.contentType()](#module_@asyncapi/parser+IntentMessage+contentType) ⇒ string - * [.examples()](#module_@asyncapi/parser+IntentMessage+examples) ⇒ Map.<string, any> - * [.hasCorrelationId()](#module_@asyncapi/parser+IntentMessage+hasCorrelationId) ⇒ boolean - * [.correlationId()](#module_@asyncapi/parser+IntentMessage+correlationId) ⇒ IntentCorrelationId \| undefined - * [.hasTags()](#module_@asyncapi/parser+IntentMessage+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+IntentMessage+tags) ⇒ Array.<IntentTag> \| undefined - * [.hasDescription()](#module_@asyncapi/parser+IntentMessage+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentMessage+description) ⇒ string \| undefined -* [.IntentOAuthFlow](#module_@asyncapi/parser+IntentOAuthFlow) ⇐ Base - * [.authorizationUrl()](#module_@asyncapi/parser+IntentOAuthFlow+authorizationUrl) ⇒ string \| undefined - * [.tokenUrl()](#module_@asyncapi/parser+IntentOAuthFlow+tokenUrl) ⇒ string \| undefined - * [.hasRefreshUrl()](#module_@asyncapi/parser+IntentOAuthFlow+hasRefreshUrl) ⇒ boolean - * [.refreshUrl()](#module_@asyncapi/parser+IntentOAuthFlow+refreshUrl) ⇒ string \| undefined - * [.scopes()](#module_@asyncapi/parser+IntentOAuthFlow+scopes) ⇒ Object.<string, string> \| undefined -* [.IntentOAuthFlows](#module_@asyncapi/parser+IntentOAuthFlows) ⇐ IntentBase - * [.hasImplicit()](#module_@asyncapi/parser+IntentOAuthFlows+hasImplicit) ⇒ boolean - * [.implicit()](#module_@asyncapi/parser+IntentOAuthFlows+implicit) ⇒ IntentOAuthFlow \| undefined - * [.hasPassword()](#module_@asyncapi/parser+IntentOAuthFlows+hasPassword) ⇒ boolean - * [.password()](#module_@asyncapi/parser+IntentOAuthFlows+password) ⇒ IntentOAuthFlow \| undefined - * [.hasClientCredentials()](#module_@asyncapi/parser+IntentOAuthFlows+hasClientCredentials) ⇒ boolean - * [.clientCredentials()](#module_@asyncapi/parser+IntentOAuthFlows+clientCredentials) ⇒ IntentOAuthFlow \| undefined - * [.hasAuthorizationCode()](#module_@asyncapi/parser+IntentOAuthFlows+hasAuthorizationCode) ⇒ boolean - * [.authorizationCode()](#module_@asyncapi/parser+IntentOAuthFlows+authorizationCode) ⇒ IntentOAuthFlow \| undefined -* [.IntentOperation](#module_@asyncapi/parser+IntentOperation) ⇐ IntentBase - * [.id()](#module_@asyncapi/parser+IntentOperation+id) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+IntentOperation+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentOperation+description) ⇒ string \| undefined - * [.hasSummary()](#module_@asyncapi/parser+IntentOperation+hasSummary) ⇒ boolean - * [.summary()](#module_@asyncapi/parser+IntentOperation+summary) ⇒ string \| undefined - * [.hasMultipleMessages()](#module_@asyncapi/parser+IntentOperation+hasMultipleMessages) ⇒ boolean - * [.messages()](#module_@asyncapi/parser+IntentOperation+messages) ⇒ Array.<IntentMessage> - * [.channels()](#module_@asyncapi/parser+IntentOperation+channels) ⇒ Array.<IntentChannel> - * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentOperation+hasBinding) ⇒ boolean - * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentOperation+binding) ⇒ any \| undefined - * [.servers()](#module_@asyncapi/parser+IntentOperation+servers) ⇒ Array.<IntentServer> - * [.server()](#module_@asyncapi/parser+IntentOperation+server) ⇒ IntentServer - * [.isClientSubscribing()](#module_@asyncapi/parser+IntentOperation+isClientSubscribing) ⇒ boolean - * [.isClientPublishing()](#module_@asyncapi/parser+IntentOperation+isClientPublishing) ⇒ boolean - * [.isApplicationSubscribing()](#module_@asyncapi/parser+IntentOperation+isApplicationSubscribing) ⇒ boolean - * [.isApplicationPublishing()](#module_@asyncapi/parser+IntentOperation+isApplicationPublishing) ⇒ boolean - * [.type()](#module_@asyncapi/parser+IntentOperation+type) ⇒ [Types](#Types) - * [.hasExternalDocs()](#module_@asyncapi/parser+IntentOperation+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+IntentOperation+externalDocs) ⇒ IntentExternalDocument \| undefined - * [.hasTags()](#module_@asyncapi/parser+IntentOperation+hasTags) ⇒ boolean - * [.tags()](#module_@asyncapi/parser+IntentOperation+tags) ⇒ Array.<IntentTag> -* [.IntentSecurityScheme](#module_@asyncapi/parser+IntentSecurityScheme) ⇐ IntentBase - * [.type()](#module_@asyncapi/parser+IntentSecurityScheme+type) ⇒ [Types](#Types) - * [.name()](#module_@asyncapi/parser+IntentSecurityScheme+name) ⇒ string - * [.in()](#module_@asyncapi/parser+IntentSecurityScheme+in) ⇒ [ApiKeyLocations](#ApiKeyLocations) - * [.hasSchema()](#module_@asyncapi/parser+IntentSecurityScheme+hasSchema) ⇒ boolean - * [.scheme()](#module_@asyncapi/parser+IntentSecurityScheme+scheme) ⇒ string \| undefined - * [.hasBearerFormat()](#module_@asyncapi/parser+IntentSecurityScheme+hasBearerFormat) ⇒ boolean - * [.bearerFormat()](#module_@asyncapi/parser+IntentSecurityScheme+bearerFormat) ⇒ string \| undefined - * [.hasDescription()](#module_@asyncapi/parser+IntentSecurityScheme+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentSecurityScheme+description) ⇒ string - * [.flows()](#module_@asyncapi/parser+IntentSecurityScheme+flows) ⇒ IntentOAuthFlows - * [.openIdConnectUrl()](#module_@asyncapi/parser+IntentSecurityScheme+openIdConnectUrl) ⇒ string -* [.IntentServerSecurity](#module_@asyncapi/parser+IntentServerSecurity) ⇐ IntentBase - * [.securityScheme()](#module_@asyncapi/parser+IntentServerSecurity+securityScheme) ⇒ IntentSecurityScheme - * [.values()](#module_@asyncapi/parser+IntentServerSecurity+values) ⇒ Array.<string> -* [.IntentServerVariable](#module_@asyncapi/parser+IntentServerVariable) ⇐ IntentBase - * [.hasName()](#module_@asyncapi/parser+IntentServerVariable+hasName) ⇒ boolean - * [.name()](#module_@asyncapi/parser+IntentServerVariable+name) ⇒ string \| undefined - * [.hasDescription()](#module_@asyncapi/parser+IntentServerVariable+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentServerVariable+description) ⇒ string \| undefined - * [.hasAllowedValues()](#module_@asyncapi/parser+IntentServerVariable+hasAllowedValues) ⇒ boolean - * [.allowedValues()](#module_@asyncapi/parser+IntentServerVariable+allowedValues) ⇒ Array.<any> - * [.hasDefaultValue()](#module_@asyncapi/parser+IntentServerVariable+hasDefaultValue) ⇒ boolean - * [.defaultValue()](#module_@asyncapi/parser+IntentServerVariable+defaultValue) ⇒ string \| undefined - * [.examples()](#module_@asyncapi/parser+IntentServerVariable+examples) ⇒ Array.<string> -* [.IntentServer](#module_@asyncapi/parser+IntentServer) ⇐ IntentBase - * [.hasName()](#module_@asyncapi/parser+IntentServer+hasName) ⇒ boolean - * [.name()](#module_@asyncapi/parser+IntentServer+name) ⇒ string \| undefined - * [.hasProtocol()](#module_@asyncapi/parser+IntentServer+hasProtocol) ⇒ boolean - * [.protocol()](#module_@asyncapi/parser+IntentServer+protocol) ⇒ string \| undefined - * [.hasUrl()](#module_@asyncapi/parser+IntentServer+hasUrl) ⇒ boolean - * [.url()](#module_@asyncapi/parser+IntentServer+url) ⇒ string \| undefined - * [.operations()](#module_@asyncapi/parser+IntentServer+operations) ⇒ Array.<IntentOperation> - * [.variables()](#module_@asyncapi/parser+IntentServer+variables) ⇒ Array.<IntentServerVariable> - * [.security()](#module_@asyncapi/parser+IntentServer+security) ⇒ Array.<IntentServerSecurity> - * [.hasProtocolVersion()](#module_@asyncapi/parser+IntentServer+hasProtocolVersion) ⇒ boolean - * [.protocolVersion()](#module_@asyncapi/parser+IntentServer+protocolVersion) ⇒ string \| undefined - * [.hasDescription()](#module_@asyncapi/parser+IntentServer+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentServer+description) ⇒ string \| undefined - * [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+IntentServer+hasBinding) ⇒ boolean - * [.binding(bindingProtocol)](#module_@asyncapi/parser+IntentServer+binding) ⇒ any \| undefined -* [.IntentTag](#module_@asyncapi/parser+IntentTag) ⇐ IntentBase - * [.name()](#module_@asyncapi/parser+IntentTag+name) ⇒ string - * [.hasDescription()](#module_@asyncapi/parser+IntentTag+hasDescription) ⇒ boolean - * [.description()](#module_@asyncapi/parser+IntentTag+description) ⇒ string \| undefined - * [.hasExternalDocs()](#module_@asyncapi/parser+IntentTag+hasExternalDocs) ⇒ boolean - * [.externalDocs()](#module_@asyncapi/parser+IntentTag+externalDocs) ⇒ IntentExternalDocument \| undefined \ No newline at end of file + +## [AsyncAPIDocument](#module_@asyncapi/parser+AsyncAPIDocument) ⇐ Base +* [.version()](#module_@asyncapi/parser+AsyncAPIDocument+version) ⇒ string +* [.hasId()](#module_@asyncapi/parser+AsyncAPIDocument+hasId) ⇒ boolean +* [.id()](#module_@asyncapi/parser+AsyncAPIDocument+id) ⇒ string \| undefined +* [.hasDefaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+hasDefaultContentType) ⇒ boolean +* [.defaultContentType()](#module_@asyncapi/parser+AsyncAPIDocument+defaultContentType) ⇒ string \| undefined +* [.info()](#module_@asyncapi/parser+AsyncAPIDocument+info) ⇒ Info +* [.applicationPublishableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishableChannels) ⇒ Array.<Channel> +* [.applicationSubscribableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribableChannels) ⇒ Array.<Channel> +* [.clientPublishableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishableChannels) ⇒ Array.<Channel> +* [.clientSubscribableChannels()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribableChannels) ⇒ Array.<Channel> +* [.channels()](#module_@asyncapi/parser+AsyncAPIDocument+channels) ⇒ Array.<Channel> +* [.applicationPublishableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishableMessages) ⇒ Array.<Message> +* [.applicationSubscribableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribableMessages) ⇒ Array.<Message> +* [.clientPublishableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishableMessages) ⇒ Array.<Message> +* [.clientSubscribableMessages()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribableMessages) ⇒ Array.<Message> +* [.messages()](#module_@asyncapi/parser+AsyncAPIDocument+messages) ⇒ Array.<Message> +* [.applicationPublishOperations()](#module_@asyncapi/parser+AsyncAPIDocument+applicationPublishOperations) ⇒ Array.<Operation> +* [.applicationSubscribeOperations()](#module_@asyncapi/parser+AsyncAPIDocument+applicationSubscribeOperations) ⇒ Array.<Operation> +* [.clientPublishOperations()](#module_@asyncapi/parser+AsyncAPIDocument+clientPublishOperations) ⇒ Array.<Operation> +* [.clientSubscribeOperations()](#module_@asyncapi/parser+AsyncAPIDocument+clientSubscribeOperations) ⇒ Array.<Operation> +* [.operations()](#module_@asyncapi/parser+AsyncAPIDocument+operations) ⇒ Array.<Operation> +* [.schemas()](#module_@asyncapi/parser+AsyncAPIDocument+schemas) ⇒ Array.<Schema> +* [.hasServers()](#module_@asyncapi/parser+AsyncAPIDocument+hasServers) ⇒ boolean +* [.servers()](#module_@asyncapi/parser+AsyncAPIDocument+servers) ⇒ Array.<Server> +* [.server()](#module_@asyncapi/parser+AsyncAPIDocument+server) ⇒ Server \| undefined +* [.securitySchemes()](#module_@asyncapi/parser+AsyncAPIDocument+securitySchemes) ⇒ Array.<SecurityScheme> +* [.hasExternalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+AsyncAPIDocument+externalDocs) ⇒ ExternalDocument \| undefined +* [.hasTags()](#module_@asyncapi/parser+AsyncAPIDocument+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+AsyncAPIDocument+tags) ⇒ Array.<Tag> \| undefined +## [Base](#module_@asyncapi/parser+Base) +* [.json()](#module_@asyncapi/parser+Base+json) ⇒ any +* [.hasExtension()](#module_@asyncapi/parser+Base+hasExtension) ⇒ boolean +* [.extension()](#module_@asyncapi/parser+Base+extension) ⇒ any \| undefined +## [Channel](#module_@asyncapi/parser+Channel) ⇐ Base +* [.operations()](#module_@asyncapi/parser+Channel+operations) ⇒ Array.<Operation> +* [.path()](#module_@asyncapi/parser+Channel+path) ⇒ string +* [.messages()](#module_@asyncapi/parser+Channel+messages) ⇒ Array.<Message> +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Channel+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Channel+binding) ⇒ any \| undefined +* [.hasParameters()](#module_@asyncapi/parser+Channel+hasParameters) ⇒ boolean +* [.parameters()](#module_@asyncapi/parser+Channel+parameters) ⇒ Array.<Schema> \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Channel+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Channel+description) ⇒ string \| undefined +## [Contact](#module_@asyncapi/parser+Contact) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+Contact+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Contact+name) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+Contact+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+Contact+url) ⇒ string \| undefined +* [.hasEmail()](#module_@asyncapi/parser+Contact+hasEmail) ⇒ boolean +* [.email()](#module_@asyncapi/parser+Contact+email) ⇒ string \| undefined +## [CorrelationId](#module_@asyncapi/parser+CorrelationId) ⇐ Base +* [.hasDescription()](#module_@asyncapi/parser+CorrelationId+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+CorrelationId+description) ⇒ string \| undefined +* [.hasLocation()](#module_@asyncapi/parser+CorrelationId+hasLocation) ⇒ boolean +* [.location()](#module_@asyncapi/parser+CorrelationId+location) ⇒ string \| undefined +## [ExternalDocument](#module_@asyncapi/parser+ExternalDocument) ⇐ Base +* [.hasDescription()](#module_@asyncapi/parser+ExternalDocument+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+ExternalDocument+description) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+ExternalDocument+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+ExternalDocument+url) ⇒ string \| undefined +## [Info](#module_@asyncapi/parser+Info) ⇐ Base +* [.title()](#module_@asyncapi/parser+Info+title) ⇒ string +* [.version()](#module_@asyncapi/parser+Info+version) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Info+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Info+description) ⇒ string \| undefined +* [.hasTermsOfService()](#module_@asyncapi/parser+Info+hasTermsOfService) ⇒ boolean +* [.termsOfService()](#module_@asyncapi/parser+Info+termsOfService) ⇒ string \| undefined +* [.hasContact()](#module_@asyncapi/parser+Info+hasContact) ⇒ boolean +* [.contact()](#module_@asyncapi/parser+Info+contact) ⇒ Contact \| undefined +* [.hasLicense()](#module_@asyncapi/parser+Info+hasLicense) ⇒ boolean +* [.license()](#module_@asyncapi/parser+Info+license) ⇒ License \| undefined +## [License](#module_@asyncapi/parser+License) ⇐ Base +* [.name()](#module_@asyncapi/parser+License+name) ⇒ string +* [.hasUrl()](#module_@asyncapi/parser+License+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+License+url) ⇒ string \| undefined +## [Message](#module_@asyncapi/parser+Message) ⇐ Base +* [.uid()](#module_@asyncapi/parser+Message+uid) ⇒ string +* [.payload()](#module_@asyncapi/parser+Message+payload) ⇒ Schema +* [.channels()](#module_@asyncapi/parser+Message+channels) ⇒ Array.<Channel> +* [.operations()](#module_@asyncapi/parser+Message+operations) ⇒ Array.<Operation> +* [.hasName()](#module_@asyncapi/parser+Message+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Message+name) ⇒ string \| undefined +* [.hasSummary()](#module_@asyncapi/parser+Message+hasSummary) ⇒ boolean +* [.summary()](#module_@asyncapi/parser+Message+summary) ⇒ string \| undefined +* [.hasTitle()](#module_@asyncapi/parser+Message+hasTitle) ⇒ boolean +* [.title()](#module_@asyncapi/parser+Message+title) ⇒ string \| undefined +* [.hasHeaders()](#module_@asyncapi/parser+Message+hasHeaders) ⇒ boolean +* [.headers()](#module_@asyncapi/parser+Message+headers) ⇒ Schema \| undefined +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Message+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Message+binding) ⇒ any \| undefined +* [.contentType()](#module_@asyncapi/parser+Message+contentType) ⇒ string +* [.examples()](#module_@asyncapi/parser+Message+examples) ⇒ Map.<string, any> +* [.hasCorrelationId()](#module_@asyncapi/parser+Message+hasCorrelationId) ⇒ boolean +* [.correlationId()](#module_@asyncapi/parser+Message+correlationId) ⇒ CorrelationId \| undefined +* [.hasTags()](#module_@asyncapi/parser+Message+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+Message+tags) ⇒ Array.<Tag> \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Message+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Message+description) ⇒ string \| undefined +## [OAuthFlow](#module_@asyncapi/parser+OAuthFlow) ⇐ Base +* [.authorizationUrl()](#module_@asyncapi/parser+OAuthFlow+authorizationUrl) ⇒ string \| undefined +* [.tokenUrl()](#module_@asyncapi/parser+OAuthFlow+tokenUrl) ⇒ string \| undefined +* [.hasRefreshUrl()](#module_@asyncapi/parser+OAuthFlow+hasRefreshUrl) ⇒ boolean +* [.refreshUrl()](#module_@asyncapi/parser+OAuthFlow+refreshUrl) ⇒ string \| undefined +* [.scopes()](#module_@asyncapi/parser+OAuthFlow+scopes) ⇒ Object.<string, string> \| undefined +## [OAuthFlows](#module_@asyncapi/parser+OAuthFlows) ⇐ Base +* [.hasImplicit()](#module_@asyncapi/parser+OAuthFlows+hasImplicit) ⇒ boolean +* [.implicit()](#module_@asyncapi/parser+OAuthFlows+implicit) ⇒ OAuthFlow \| undefined +* [.hasPassword()](#module_@asyncapi/parser+OAuthFlows+hasPassword) ⇒ boolean +* [.password()](#module_@asyncapi/parser+OAuthFlows+password) ⇒ OAuthFlow \| undefined +* [.hasClientCredentials()](#module_@asyncapi/parser+OAuthFlows+hasClientCredentials) ⇒ boolean +* [.clientCredentials()](#module_@asyncapi/parser+OAuthFlows+clientCredentials) ⇒ OAuthFlow \| undefined +* [.hasAuthorizationCode()](#module_@asyncapi/parser+OAuthFlows+hasAuthorizationCode) ⇒ boolean +* [.authorizationCode()](#module_@asyncapi/parser+OAuthFlows+authorizationCode) ⇒ OAuthFlow \| undefined +## [Operation](#module_@asyncapi/parser+Operation) ⇐ Base +* [.id()](#module_@asyncapi/parser+Operation+id) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Operation+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Operation+description) ⇒ string \| undefined +* [.hasSummary()](#module_@asyncapi/parser+Operation+hasSummary) ⇒ boolean +* [.summary()](#module_@asyncapi/parser+Operation+summary) ⇒ string \| undefined +* [.hasMultipleMessages()](#module_@asyncapi/parser+Operation+hasMultipleMessages) ⇒ boolean +* [.messages()](#module_@asyncapi/parser+Operation+messages) ⇒ Array.<Message> +* [.channels()](#module_@asyncapi/parser+Operation+channels) ⇒ Array.<Channel> +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Operation+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Operation+binding) ⇒ any \| undefined +* [.servers()](#module_@asyncapi/parser+Operation+servers) ⇒ Array.<Server> +* [.server()](#module_@asyncapi/parser+Operation+server) ⇒ Server +* [.isClientSubscribing()](#module_@asyncapi/parser+Operation+isClientSubscribing) ⇒ boolean +* [.isClientPublishing()](#module_@asyncapi/parser+Operation+isClientPublishing) ⇒ boolean +* [.isApplicationSubscribing()](#module_@asyncapi/parser+Operation+isApplicationSubscribing) ⇒ boolean +* [.isApplicationPublishing()](#module_@asyncapi/parser+Operation+isApplicationPublishing) ⇒ boolean +* [.type()](#module_@asyncapi/parser+Operation+type) ⇒ [Types](#Types) +* [.hasExternalDocs()](#module_@asyncapi/parser+Operation+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+Operation+externalDocs) ⇒ ExternalDocument \| undefined +* [.hasTags()](#module_@asyncapi/parser+Operation+hasTags) ⇒ boolean +* [.tags()](#module_@asyncapi/parser+Operation+tags) ⇒ Array.<Tag> +## [SecurityScheme](#module_@asyncapi/parser+SecurityScheme) ⇐ Base +* [.type()](#module_@asyncapi/parser+SecurityScheme+type) ⇒ [Types](#Types) +* [.name()](#module_@asyncapi/parser+SecurityScheme+name) ⇒ string +* [.in()](#module_@asyncapi/parser+SecurityScheme+in) ⇒ [ApiKeyLocations](#ApiKeyLocations) +* [.hasSchema()](#module_@asyncapi/parser+SecurityScheme+hasSchema) ⇒ boolean +* [.scheme()](#module_@asyncapi/parser+SecurityScheme+scheme) ⇒ string \| undefined +* [.hasBearerFormat()](#module_@asyncapi/parser+SecurityScheme+hasBearerFormat) ⇒ boolean +* [.bearerFormat()](#module_@asyncapi/parser+SecurityScheme+bearerFormat) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+SecurityScheme+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+SecurityScheme+description) ⇒ string +* [.flows()](#module_@asyncapi/parser+SecurityScheme+flows) ⇒ OAuthFlows +* [.openIdConnectUrl()](#module_@asyncapi/parser+SecurityScheme+openIdConnectUrl) ⇒ string +## [ServerSecurity](#module_@asyncapi/parser+ServerSecurity) ⇐ Base +* [.securityScheme()](#module_@asyncapi/parser+ServerSecurity+securityScheme) ⇒ SecurityScheme +* [.values()](#module_@asyncapi/parser+ServerSecurity+values) ⇒ Array.<string> +## [ServerVariable](#module_@asyncapi/parser+ServerVariable) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+ServerVariable+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+ServerVariable+name) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+ServerVariable+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+ServerVariable+description) ⇒ string \| undefined +* [.hasAllowedValues()](#module_@asyncapi/parser+ServerVariable+hasAllowedValues) ⇒ boolean +* [.allowedValues()](#module_@asyncapi/parser+ServerVariable+allowedValues) ⇒ Array.<any> +* [.hasDefaultValue()](#module_@asyncapi/parser+ServerVariable+hasDefaultValue) ⇒ boolean +* [.defaultValue()](#module_@asyncapi/parser+ServerVariable+defaultValue) ⇒ string \| undefined +* [.examples()](#module_@asyncapi/parser+ServerVariable+examples) ⇒ Array.<string> +## [Server](#module_@asyncapi/parser+Server) ⇐ Base +* [.hasName()](#module_@asyncapi/parser+Server+hasName) ⇒ boolean +* [.name()](#module_@asyncapi/parser+Server+name) ⇒ string \| undefined +* [.hasProtocol()](#module_@asyncapi/parser+Server+hasProtocol) ⇒ boolean +* [.protocol()](#module_@asyncapi/parser+Server+protocol) ⇒ string \| undefined +* [.hasUrl()](#module_@asyncapi/parser+Server+hasUrl) ⇒ boolean +* [.url()](#module_@asyncapi/parser+Server+url) ⇒ string \| undefined +* [.operations()](#module_@asyncapi/parser+Server+operations) ⇒ Array.<Operation> +* [.variables()](#module_@asyncapi/parser+Server+variables) ⇒ Array.<ServerVariable> +* [.security()](#module_@asyncapi/parser+Server+security) ⇒ Array.<ServerSecurity> +* [.hasProtocolVersion()](#module_@asyncapi/parser+Server+hasProtocolVersion) ⇒ boolean +* [.protocolVersion()](#module_@asyncapi/parser+Server+protocolVersion) ⇒ string \| undefined +* [.hasDescription()](#module_@asyncapi/parser+Server+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Server+description) ⇒ string \| undefined +* [.hasBinding(bindingProtocol)](#module_@asyncapi/parser+Server+hasBinding) ⇒ boolean +* [.binding(bindingProtocol)](#module_@asyncapi/parser+Server+binding) ⇒ any \| undefined +## [Tag](#module_@asyncapi/parser+Tag) ⇐ Base +* [.name()](#module_@asyncapi/parser+Tag+name) ⇒ string +* [.hasDescription()](#module_@asyncapi/parser+Tag+hasDescription) ⇒ boolean +* [.description()](#module_@asyncapi/parser+Tag+description) ⇒ string \| undefined +* [.hasExternalDocs()](#module_@asyncapi/parser+Tag+hasExternalDocs) ⇒ boolean +* [.externalDocs()](#module_@asyncapi/parser+Tag+externalDocs) ⇒ ExternalDocument \| undefined \ No newline at end of file From 54ba918d933844dd8835ca3342f6404a293de829 Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Wed, 21 Apr 2021 22:18:34 +0200 Subject: [PATCH 18/18] Improve documentation --- docs/Intents.md | 28 -------------- docs/api/README.md | 38 +++++++++++++++++++ .../{generated_API.md => api/generated_v2.md} | 0 docs/{API.md => api/v2.md} | 1 - 4 files changed, 38 insertions(+), 29 deletions(-) delete mode 100644 docs/Intents.md create mode 100644 docs/api/README.md rename docs/{generated_API.md => api/generated_v2.md} (100%) rename docs/{API.md => api/v2.md} (99%) diff --git a/docs/Intents.md b/docs/Intents.md deleted file mode 100644 index 1fba75e7f..000000000 --- a/docs/Intents.md +++ /dev/null @@ -1,28 +0,0 @@ -# Intents - -The intents are wrapped in models, to provide independent concepts that will always exist regardless of the specification. The upsides to using this approach is: -- More maintainable. -- When viewed from the tooling perspective these models would also make sense and make it iteratable. -- To be consistent, so we do not reject intents on unclear rules making it confusing to understand. - -## Models -These are the intent models added to the parser -- **AsyncAPI**, the root of the structure. -- **Message**, because message can exist without operation, and channels. -- **Channel**, describing a `topic`/`channel` message is transmitted over by some operation. -- **Operation**, describes the action to take on a channel with a message. -- **Server**, you have to connect to something -- **Info**, defined information about your application. -- **Schema**, JSON Schema draft 7, left as is and don't have intents. -- **Tag**, meta data. -- **SecurityScheme**, for security specifications needed. - -### Rules -To remove confusion on when something is a model and when it is not, where and when intents are added we have defined some rules: -- Root level intents (`AsyncAPI` model) SHOULD never return properties of models but instead answer questions, return the model itself or a collection of models - - Reason why root level does not return properties, is because we need to limit the number of nested intents. - - i.e. to avoid `AsyncAPIDocument.extensionForChannelThatApplicationSubscribesTo('', '')` -- Models contain intents to return properties, answer questions, return other model or a collection of models. - - Reason behind this is to segregate intents by responsibility. -- Models are entity objects and should not be value objects - - Does it make sense conceptually independently from the spec? diff --git a/docs/api/README.md b/docs/api/README.md new file mode 100644 index 000000000..c118b4bef --- /dev/null +++ b/docs/api/README.md @@ -0,0 +1,38 @@ +# Intent-driven API +Starting from **Parser API v2**, the API follows an Intent-driven design approach, based on user intents rather than technical mechanics. + +An **Intent** represents a user intention of performing an action that solves a clear use case. + +For example, `Buy five watermelons` is the intent for `Going to the fruit shop, grab five watermelons, go to the counter, pay with cash, put the watermelon in a bag, exit the shop`. + +Base on this principle, we have built an API based on the intents of final users, hiding the complexity of the tasks (do not care about going to the fruit shop, we do that for you) and providing better usability. +We tried to cover most use cases; however, the API accepts new intents adding new intents at any moment. + +## Design + +Intents are wrapped in models. Models are spec-independent but based on AsyncAPI concepts that will always exist regardless of the specification version. + +The upsides of using this approach are: +- Better user experience. Intents are much simple to use and do not force users to know about all spec internals. +- Improves resiliency to breaking changes on the final user code. Most of the time, users will **only** need to upgrade to the latest version of the parser to be up-to-date with the latest spec. + +All Parsers, no matters the language, should follow the Intent-driven Parser API. +This API is versioned so Parser implementations can maintain their compatibility matrix. + +### Models + +Some examples of models are: +- **AsyncAPI** is the root model. Most of the intents are here, so users don't need to navigate through the object hierarchy. +- **Message** represents a message in your message-driven architecture. They can relate to Operations and Channels, but the relationship is not mandatory. +- **Channel** describes a `topic`/`channel` a Message is transmitted over by some Operation. +- **Operation** describes an action rather the Application or the Client performs. It links messages with channels. +- **Server** represents a Server in your message-driven architecture. Clients connect to servers. +- **Info** contains defined information about your Application. +- **Schema** is used for representing [JSON Schema Draft 7](https://json-schema.org/draft-07/json-schema-release-notes.html) objects. +- **Tag** contains metadata. +- **SecurityScheme** represents security specifications for servers. + +## Development +To avoid polluting the API with intents that have no apparent use case or can be replaced by a call to another model, we have defined the following rule: + +Intents at the root model (`AsyncAPI`) **SHOULD** never return properties of other models but instead answer questions, return the model itself or a collection of models. diff --git a/docs/generated_API.md b/docs/api/generated_v2.md similarity index 100% rename from docs/generated_API.md rename to docs/api/generated_v2.md diff --git a/docs/API.md b/docs/api/v2.md similarity index 99% rename from docs/API.md rename to docs/api/v2.md index e0ef3f7cc..aecea04d7 100644 --- a/docs/API.md +++ b/docs/api/v2.md @@ -142,4 +142,3 @@ - `Tag.description()` : string - `Tag.hasExternalDocs()` : boolean - `Tag.externalDocs` : ExternalDocumentation -