From 92f59cbb1e0570e9d3791ccee086ee9bcb120358 Mon Sep 17 00:00:00 2001 From: Matatjahu Date: Tue, 10 May 2022 23:03:14 +0200 Subject: [PATCH] chore: move root tags and externalDocs to the info object --- spec/asyncapi.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 00f4d021c..6b76fa8ee 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -162,9 +162,6 @@ Field Name | Type | Description defaultContentType | [Default Content Type](#defaultContentTypeString) | Default content type to use when encoding/decoding a message's payload. channels | [Channels Object](#channelsObject) | **Required** The available channels and messages for the API. components | [Components Object](#componentsObject) | An element to hold various schemas for the specification. -tags | [Tags Object](#tagsObject) | A list of tags used by the specification with additional metadata. Each tag name in the list MUST be unique. -externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation. - This object can be extended with [Specification Extensions](#specificationExtensions). @@ -221,6 +218,8 @@ Field Name | Type | Description termsOfService | `string` | A URL to the Terms of Service for the API. MUST be in the format of a URL. contact | [Contact Object](#contactObject) | The contact information for the exposed API. license | [License Object](#licenseObject) | The license information for the exposed API. +tags | [Tags Object](#tagsObject) | A list of tags for application API documentation control. Tags can be used for logical grouping of applications. +externalDocs | [External Documentation Object](#externalDocumentationObject) | Additional external documentation of the exposed API. This object can be extended with [Specification Extensions](#specificationExtensions). @@ -229,7 +228,8 @@ This object can be extended with [Specification Extensions](#specificationExtens ```json { "title": "AsyncAPI Sample App", - "description": "This is a sample server.", + "version": "1.0.1", + "description": "This is a sample app.", "termsOfService": "https://asyncapi.org/terms/", "contact": { "name": "API Support", @@ -240,13 +240,22 @@ This object can be extended with [Specification Extensions](#specificationExtens "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "version": "1.0.1" + "externalDocs": { + "description": "Find more info here", + "url": "https://www.asyncapi.org" + }, + "tags": [ + { + "name": "e-commerce" + } + ] } ``` ```yaml title: AsyncAPI Sample App -description: This is a sample server. +version: 1.0.1 +description: This is a sample app. termsOfService: https://asyncapi.org/terms/ contact: name: API Support @@ -255,7 +264,11 @@ contact: license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html -version: 1.0.1 +externalDocs: + description: Find more info here + url: https://www.asyncapi.org +tags: + - name: e-commerce ``` #### Contact Object