From 7cfbefda08a988f216b2b080601426bc5cde82cf Mon Sep 17 00:00:00 2001 From: Sergio Moya <1083296+smoya@users.noreply.github.com> Date: Tue, 18 Apr 2023 12:55:38 +0200 Subject: [PATCH] fix: add missing models and functions --- README.md | 11 ++++++++++- docs/v1.md | 9 +++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5db8702..f084330 100644 --- a/README.md +++ b/README.md @@ -31,20 +31,29 @@ These are the most important models in this API: - **AsyncAPIDocument** is the root model. Most of the intents are here, so users don't need to navigate through the object hierarchy. - **Binding** is a mechanism to define protocol-specific information. - **Channel** describes a `topic`/`channel` a Message is transmitted over by some Operation. +- **ChannelParameter** represents a Channel Parameter for channel address template substitution. - **Components** holds a set of reusable objects for different aspects of the AsyncAPI specification. - **Contact** contains Contact information of the Application or Client API. - **CorrelationId** specifies an identifier at design time that can be used for message tracing and correlation. +- **Extension** represents the value of a single object extensions. +- **ExternalDocumention** contains external documentation source described by External Documentation. - **Info** contains defined information about the Application or Client API. - **License** contains License information of the Application or Client API. - **Message** represents a message in your message-driven architecture. They can relate to Operations and Channels, but the relationship is not mandatory. +- **MessageExample** defines sample payload and headers examples of the described Message. +- **MessageTrait** defines reusable Message parts. - **OAuthFlow** holds configuration details for a supported OAuth Flow. - **OAuthFlows** allows configuration of the supported OAuth Flows. - **Operation** describes an action performed by the Application or the Client. It links messages with channels. +- **OperationTrait** defines reusable Operation parts. - **Schema** is a superset of the [JSON Schema Specification Draft 07](https://json-schema.org/understanding-json-schema/basics.html). See https://www.asyncapi.com/docs/specifications/latest#schemaObject. - **SecurityScheme** represents security specifications for servers. - **Server** represents a Server in your message-driven architecture. Application or Client always wants to connect to some server. - **ServerVariable** represents a Server Variable for server URL template substitution. -- **Tag** contains metadata +- **Tag** contains metadata described by Tag. + +> **Note** +> Each model described has its corresponding collection model (except **AsyncAPIDocument**), such as **Servers**. ## Development To avoid polluting the API with intents that have no clear use case or can be replaced by a call to another model, we have defined the following rule: diff --git a/docs/v1.md b/docs/v1.md index b118380..ceff307 100644 --- a/docs/v1.md +++ b/docs/v1.md @@ -23,6 +23,7 @@ - protocol(): `string` - version(): `string` - value(): `any` +- extensions(): `Extensions` ## Bindings - all(): `Binding[]` @@ -242,9 +243,9 @@ - has(id: `string`): `boolean` ## OAuthFlow -- hasAuthorizationUrl(): `string` | `undefined` +- hasAuthorizationUrl(): `boolean` - authorizationUrl(): `string` | `undefined` -- hasTokenUrl(): `string` | `undefined` +- hasTokenUrl(): `boolean` - tokenUrl(): `string` | `undefined` - hasRefreshUrl(): `boolean` - refreshUrl(): `string` | `undefined` @@ -267,6 +268,8 @@ - action(): `enum{'send', 'receive', 'publish', 'subscribe'}` - isSend(): `boolean` - isReceive(): `boolean` +- hasOperationId(): `boolean` +- operationId(): `string` | `undefined` - hasSummary(): `boolean` - summary(): `string` | `undefined` - hasDescription(): `boolean` @@ -293,6 +296,8 @@ ## OperationTrait - id(): `string` +- hasOperationId(): `boolean` +- operationId(): `string` | `undefined` - hasSummary(): `boolean` - summary(): `string` | `undefined` - hasDescription(): `boolean`