diff --git a/package-lock.json b/package-lock.json index 0ea4ac2c..560697ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.16", + "version": "6.0.0-next-major-spec.17", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.16", + "version": "6.0.0-next-major-spec.17", "license": "Apache-2.0", "dependencies": { "@types/json-schema": "^7.0.11" diff --git a/package.json b/package.json index d33df423..b8072f0f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asyncapi/specs", - "version": "6.0.0-next-major-spec.16", + "version": "6.0.0-next-major-spec.17", "description": "AsyncAPI schema versions", "main": "index.js", "types": "index.d.ts", diff --git a/schemas/3.0.0-without-$id.json b/schemas/3.0.0-without-$id.json index bc4f7974..99d4bc2b 100644 --- a/schemas/3.0.0-without-$id.json +++ b/schemas/3.0.0-without-$id.json @@ -50,68 +50,75 @@ "additionalItems": true }, "info": { - "type": "object", "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "#/definitions/specificationExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - }, - "tags": { - "type": "array", - "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/tag" - } - ] + "allOf": [ + { + "type": "object", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "#/definitions/specificationExtension" + } }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - { - "$ref": "#/definitions/externalDocs" + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "#/definitions/contact" + }, + "license": { + "$ref": "#/definitions/license" + }, + "tags": { + "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/tag" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "#/definitions/Reference" + }, + { + "$ref": "#/definitions/externalDocs" + } + ] } - ] + } + }, + { + "$ref": "#/definitions/infoExtensions" } - }, + ], "examples": [ { "title": "AsyncAPI Sample App", @@ -292,6 +299,23 @@ } ] }, + "infoExtensions": { + "type": "object", + "description": "The object that lists all the extensions of Info", + "properties": { + "x-x": { + "$ref": "#/definitions/extensions-x-0.1.0-schema" + } + } + }, + "extensions-x-0.1.0-schema": { + "type": "string", + "description": "This extension allows you to provide the Twitter username of the account representing the team/company of the API.", + "example": [ + "sambhavgupta75", + "AsyncAPISpec" + ] + }, "servers": { "description": "An object representing multiple servers.", "type": "object", @@ -6345,7 +6369,7 @@ }, "operationTrait": { "type": "object", - "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel, messages and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": { diff --git a/schemas/3.0.0.json b/schemas/3.0.0.json index 8f80aaa7..54969618 100644 --- a/schemas/3.0.0.json +++ b/schemas/3.0.0.json @@ -53,68 +53,75 @@ }, "http://asyncapi.com/definitions/3.0.0/info.json": { "$id": "http://asyncapi.com/definitions/3.0.0/info.json", - "type": "object", "description": "The object provides metadata about the API. The metadata can be used by the clients if needed.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-[\\w\\d\\.\\x2d_]+$": { - "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." - }, - "termsOfService": { - "type": "string", - "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", - "format": "uri" - }, - "contact": { - "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" - }, - "license": { - "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" - }, - "tags": { - "type": "array", - "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", - "items": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" - }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" - } - ] + "allOf": [ + { + "type": "object", + "required": [ + "version", + "title" + ], + "additionalProperties": false, + "patternProperties": { + "^x-[\\w\\d\\.\\x2d_]+$": { + "$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json" + } }, - "uniqueItems": true - }, - "externalDocs": { - "oneOf": [ - { - "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + "properties": { + "title": { + "type": "string", + "description": "A unique and precise title of the API." }, - { - "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + "version": { + "type": "string", + "description": "A semantic version number of the API." + }, + "description": { + "type": "string", + "description": "A longer description of the API. Should be different from the title. CommonMark is allowed." + }, + "termsOfService": { + "type": "string", + "description": "A URL to the Terms of Service for the API. MUST be in the format of a URL.", + "format": "uri" + }, + "contact": { + "$ref": "http://asyncapi.com/definitions/3.0.0/contact.json" + }, + "license": { + "$ref": "http://asyncapi.com/definitions/3.0.0/license.json" + }, + "tags": { + "type": "array", + "description": "A list of tags for application API documentation control. Tags can be used for logical grouping of applications.", + "items": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/tag.json" + } + ] + }, + "uniqueItems": true + }, + "externalDocs": { + "oneOf": [ + { + "$ref": "http://asyncapi.com/definitions/3.0.0/Reference.json" + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/externalDocs.json" + } + ] } - ] + } + }, + { + "$ref": "http://asyncapi.com/definitions/3.0.0/infoExtensions.json" } - }, + ], "examples": [ { "title": "AsyncAPI Sample App", @@ -301,6 +308,25 @@ } ] }, + "http://asyncapi.com/definitions/3.0.0/infoExtensions.json": { + "$id": "http://asyncapi.com/definitions/3.0.0/infoExtensions.json", + "type": "object", + "description": "The object that lists all the extensions of Info", + "properties": { + "x-x": { + "$ref": "http://asyncapi.com/extensions/x/0.1.0/schema.json" + } + } + }, + "http://asyncapi.com/extensions/x/0.1.0/schema.json": { + "$id": "http://asyncapi.com/extensions/x/0.1.0/schema.json", + "type": "string", + "description": "This extension allows you to provide the Twitter username of the account representing the team/company of the API.", + "example": [ + "sambhavgupta75", + "AsyncAPISpec" + ] + }, "http://asyncapi.com/definitions/3.0.0/servers.json": { "$id": "http://asyncapi.com/definitions/3.0.0/servers.json", "description": "An object representing multiple servers.", @@ -6428,7 +6454,7 @@ "http://asyncapi.com/definitions/3.0.0/operationTrait.json": { "$id": "http://asyncapi.com/definitions/3.0.0/operationTrait.json", "type": "object", - "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel and traits ones.", + "description": "Describes a trait that MAY be applied to an Operation Object. This object MAY contain any property from the Operation Object, except the action, channel, messages and traits ones.", "additionalProperties": false, "patternProperties": { "^x-[\\w\\d\\.\\x2d_]+$": {