From 6e3f854d3646b792a9421667795dbfd67b884c95 Mon Sep 17 00:00:00 2001 From: ue85540 Date: Thu, 20 Apr 2023 11:10:19 +0200 Subject: [PATCH 01/16] remove schemaFormat from message object --- spec/asyncapi.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index d3e60384..9ea3dcb4 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1256,7 +1256,6 @@ Field Name | Type | Description headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. payload | `any` | Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. -schemaFormat | `string` | A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#messageObjectSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#messageObjectSchemaFormatTable). contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. title | `string` | A human-friendly title for the message. @@ -1414,7 +1413,6 @@ Example using Avro to define the payload: { "name": "signup" }, { "name": "register" } ], - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", "payload": { "$ref": "path/to/user-create.avsc#/UserCreate" } @@ -1431,7 +1429,6 @@ tags: - name: user - name: signup - name: register -schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0' payload: $ref: 'path/to/user-create.avsc/#UserCreate' ``` @@ -1455,7 +1452,6 @@ Field Name | Type | Description messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. -schemaFormat | `string` | A string containing the name of the schema format/language used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. title | `string` | A human-friendly title for the message. @@ -1472,13 +1468,11 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ```json { - "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", "contentType": "application/json" } ``` ```yaml -schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0' contentType: application/json ``` From 3a13cfc7d7e3989d852cb0646683aa9bdfdb44ed Mon Sep 17 00:00:00 2001 From: ue85540 Date: Thu, 20 Apr 2023 12:54:19 +0200 Subject: [PATCH 02/16] Add Multi Format Schema Object --- spec/asyncapi.md | 60 +++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 9ea3dcb4..99d18dc0 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -105,6 +105,7 @@ Aside from the issues mentioned above, there may also be infrastructure configur - [External Documentation Object](#externalDocumentationObject) - [Components Object](#componentsObject) - [Reference Object](#referenceObject) + - [Multi Format Schema Object](#multiFormatSchemaObject) - [Schema Object](#schemaObject) - [Security Scheme Object](#securitySchemeObject) - [OAuth Flows Object](#oauth-flows-object) @@ -1253,8 +1254,8 @@ Describes a message received on a given channel and operation. Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. -payload | `any` | Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. +headers | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +payload | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. Schema MUST be of type "object". In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1269,24 +1270,6 @@ Field Name | Type | Description This object MAY be extended with [Specification Extensions](#specificationExtensions). -##### Schema formats table - -The following table contains a set of values that every implementation MUST support. - -Name | Allowed values | Notes ----|:---:|--- -[AsyncAPI 3.0.0 Schema Object](#schemaObject) | `application/vnd.aai.asyncapi;version=3.0.0`, `application/vnd.aai.asyncapi+json;version=3.0.0`, `application/vnd.aai.asyncapi+yaml;version=3.0.0` | This is the default when a `schemaFormat` is not provided. -[JSON Schema Draft 07](https://json-schema.org/specification-links.html#draft-7) | `application/schema+json;version=draft-07`, `application/schema+yaml;version=draft-07` | - -The following table contains a set of values that every implementation is RECOMMENDED to support. - -Name | Allowed values | Notes ----|:---:|--- -[Avro 1.9.0 schema](https://avro.apache.org/docs/1.9.0/spec.html#schemas) | `application/vnd.apache.avro;version=1.9.0`, `application/vnd.apache.avro+json;version=1.9.0`, `application/vnd.apache.avro+yaml;version=1.9.0` | -[OpenAPI 3.0.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) | `application/vnd.oai.openapi;version=3.0.0`, `application/vnd.oai.openapi+json;version=3.0.0`, `application/vnd.oai.openapi+yaml;version=3.0.0` | -[RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | - - ##### Message Object Example ```json @@ -1450,7 +1433,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. +headers | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1485,7 +1468,7 @@ Message Example Object represents an example of a [Message Object](#messageObjec Field Name | Type | Description ---|:---:|--- headers | `Map[string, any]` | The value of this field MUST validate against the [Message Object's headers](#messageObjectHeaders) field. -payload | `any` | The value of this field MUST validate against the [Message Object's payload](#messageObjectPayload) field. +payload | `Map[string, any]` | The value of this field MUST validate against the [Message Object's payload](#messageObjectPayload) field. name | `string` | A machine-friendly name. summary | `string` | A short summary of what the example is about. @@ -1626,7 +1609,7 @@ All objects defined within the components object will have no effect on the API Field Name | Type | Description ---|:---|--- - schemas | Map[`string`, [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). + schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). channels | Map[`string`, [Channel Object](#channelObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Objects](#channelObject). operations | Map[`string`, [Operation Item Object](#operationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Item Objects](#operationObject). @@ -1876,6 +1859,37 @@ components: maximum: 100 ``` +#### Multi Format Schema Object + +The Multi Format Schema Object allows to define non AsyncApi schema. + +##### Fixed Fields + +Field Name | Type | Description +---|:---:|--- +schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When yousing a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. +schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. - Non json based schema e.g. protobuff and xsd schould be inlined as string. + +This object MAY be extended with [Specification Extensions](#specificationExtensions). + +##### Schema formats table + +The following table contains a set of values that every implementation MUST support. + +Name | Allowed values | Notes +---|:---:|--- +[AsyncAPI 3.0.0 Schema Object](#schemaObject) | `application/vnd.aai.asyncapi;version=3.0.0`, `application/vnd.aai.asyncapi+json;version=3.0.0`, `application/vnd.aai.asyncapi+yaml;version=3.0.0` | This is the default when a `schemaFormat` is not provided. +[JSON Schema Draft 07](https://json-schema.org/specification-links.html#draft-7) | `application/schema+json;version=draft-07`, `application/schema+yaml;version=draft-07` | + +The following table contains a set of values that every implementation is RECOMMENDED to support. + +Name | Allowed values | Notes +---|:---:|--- +[Avro 1.9.0 schema](https://avro.apache.org/docs/1.9.0/spec.html#schemas) | `application/vnd.apache.avro;version=1.9.0`, `application/vnd.apache.avro+json;version=1.9.0`, `application/vnd.apache.avro+yaml;version=1.9.0` | +[OpenAPI 3.0.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) | `application/vnd.oai.openapi;version=3.0.0`, `application/vnd.oai.openapi+json;version=3.0.0`, `application/vnd.oai.openapi+yaml;version=3.0.0` | +[RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | + + #### Schema Object The Schema Object allows the definition of input and output data types. From 19d4a7f9702104fce33d8b836507d806e7755a4d Mon Sep 17 00:00:00 2001 From: ue85540 Date: Thu, 20 Apr 2023 13:05:11 +0200 Subject: [PATCH 03/16] enhance examples --- spec/asyncapi.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 99d18dc0..670a7b90 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1397,7 +1397,10 @@ Example using Avro to define the payload: { "name": "register" } ], "payload": { - "$ref": "path/to/user-create.avsc#/UserCreate" + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "schema": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } } } ``` @@ -1413,7 +1416,9 @@ tags: - name: signup - name: register payload: - $ref: 'path/to/user-create.avsc/#UserCreate' + schemaFormat: 'application/vnd.apache.avro+yaml;version=1.9.0' + schema: + $ref: 'path/to/user-create.avsc/#UserCreate' ``` @@ -1672,6 +1677,12 @@ my.org.User "type": "string" } } + }, + "AvroExample": { + "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", + "payload": { + "$ref": "path/to/user-create.avsc#/UserCreate" + } } }, "servers": { @@ -1794,6 +1805,10 @@ components: format: int64 name: type: string + AvroExample: + schemaFormat: application/vnd.apache.avro+json;version=1.9.0 + schema: + $ref: 'path/to/user-create.avsc/#UserCreate' servers: development: url: "{stage}.in.mycompany.com:{port}" From 04ed7af219c6e1129d825d740c97ffeda2f074bb Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:39:52 +0200 Subject: [PATCH 04/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 670a7b90..9122cef5 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1680,7 +1680,7 @@ my.org.User }, "AvroExample": { "schemaFormat": "application/vnd.apache.avro+json;version=1.9.0", - "payload": { + "schema": { "$ref": "path/to/user-create.avsc#/UserCreate" } } From 604b8427adf73e9dd37fe86090d08003318675f8 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:41:06 +0200 Subject: [PATCH 05/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 9122cef5..4956526f 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1883,7 +1883,7 @@ The Multi Format Schema Object allows to define non AsyncApi schema. Field Name | Type | Description ---|:---:|--- schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When yousing a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. -schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. - Non json based schema e.g. protobuff and xsd schould be inlined as string. +schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. - Non-JSON based schema, e.g. Protobuff or XSD should be inlined as string. This object MAY be extended with [Specification Extensions](#specificationExtensions). From 96d79dffcc5e3ad144fa27efc0f8640e8c016a20 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:41:20 +0200 Subject: [PATCH 06/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 4956526f..d861a2b0 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1254,7 +1254,7 @@ Describes a message received on a given channel and operation. Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). payload | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. Schema MUST be of type "object". In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. From 8148bc91616947b50215c97d88bc55ae0b48c06d Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:41:31 +0200 Subject: [PATCH 07/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index d861a2b0..7fa25901 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1255,7 +1255,7 @@ Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -payload | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. Schema MUST be of type "object". In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. Schema MUST be of type "object". In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. From 027b156e534437434c0e5d47924df2b97408f3ea Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:43:16 +0200 Subject: [PATCH 08/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 7fa25901..ec0564bb 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1876,7 +1876,7 @@ components: #### Multi Format Schema Object -The Multi Format Schema Object allows to define non AsyncApi schema. +The Multi Format Schema Object allows to define non AsyncAPI schema. ##### Fixed Fields From 8f3f6e76b056e4d7c1de9439d6bd11b82cd30734 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:43:23 +0200 Subject: [PATCH 09/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index ec0564bb..21795763 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1438,7 +1438,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#schemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. From 9a957b9bca8b83bd7c957d87683e6dca7cdfa31a Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Tue, 25 Apr 2023 17:44:19 +0200 Subject: [PATCH 10/16] Update spec/asyncapi.md Co-authored-by: Lukasz Gornicki --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 21795763..aba6ebf5 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1882,7 +1882,7 @@ The Multi Format Schema Object allows to define non AsyncAPI schema. Field Name | Type | Description ---|:---:|--- -schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When yousing a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. +schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. - Non-JSON based schema, e.g. Protobuff or XSD should be inlined as string. This object MAY be extended with [Specification Extensions](#specificationExtensions). From 82ee26c81600728de18b310dc40859f5b468431e Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Fri, 12 May 2023 10:25:06 +0200 Subject: [PATCH 11/16] Update spec/asyncapi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fran Méndez --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index aba6ebf5..8ae04e03 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1874,7 +1874,7 @@ components: maximum: 100 ``` -#### Multi Format Schema Object +#### Multiformat Schema Object The Multi Format Schema Object allows to define non AsyncAPI schema. From b4bb9d4a9950d3f8c001ea0cfd44858ef7e7082a Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Fri, 12 May 2023 10:25:17 +0200 Subject: [PATCH 12/16] Update spec/asyncapi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fran Méndez --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 8ae04e03..753d92d3 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1876,7 +1876,7 @@ components: #### Multiformat Schema Object -The Multi Format Schema Object allows to define non AsyncAPI schema. +The Multiformat Schema Object represents a schema definition. It differs from the [Schema Object](#schemaObject) in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.). ##### Fixed Fields From 0b2ec6904dfd863c18c865a3e593e21493e7c7c7 Mon Sep 17 00:00:00 2001 From: Heiko Henning Date: Fri, 12 May 2023 10:25:31 +0200 Subject: [PATCH 13/16] Update spec/asyncapi.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fran Méndez --- spec/asyncapi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 753d92d3..0d983acb 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1883,7 +1883,7 @@ The Multiformat Schema Object represents a schema definition. It differs from th Field Name | Type | Description ---|:---:|--- schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. -schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON. - Non-JSON based schema, e.g. Protobuff or XSD should be inlined as string. +schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It MUST match the schema format defined in [`schemaFormat`](#multiFormatSchemaObjectSchemaFormat), including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string. This object MAY be extended with [Specification Extensions](#specificationExtensions). From 5aef5acdb75781d91c307810d5578e6bbd5f5511 Mon Sep 17 00:00:00 2001 From: ue85540 Date: Sun, 14 May 2023 10:16:09 +0200 Subject: [PATCH 14/16] adapet latest suggestions --- spec/asyncapi.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 0d983acb..8c0149f5 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1254,8 +1254,8 @@ Describes a message received on a given channel and operation. Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. Schema MUST be of type "object". In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1438,7 +1438,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case a [Schema Object](#schemaObject) is provided, the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1614,7 +1614,7 @@ All objects defined within the components object will have no effect on the API Field Name | Type | Description ---|:---|--- - schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Objects](#schemaObject). In case that a [Schema Objects](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). + schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Object](#schemaObject). In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). channels | Map[`string`, [Channel Object](#channelObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Objects](#channelObject). operations | Map[`string`, [Operation Item Object](#operationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Item Objects](#operationObject). @@ -1882,7 +1882,8 @@ The Multiformat Schema Object represents a schema definition. It differs from th Field Name | Type | Description ---|:---:|--- -schemaFormat | `string` | **Required**. A string containing the name of the schema format used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject). When the payload is defined using a `$ref` to a remote file, it is RECOMMENDED the schema format includes the file encoding type to allow implementations to parse the file correctly. E.g., adding `+yaml` if content type is `application/vnd.apache.avro` results in `application/vnd.apache.avro+yaml`.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using a [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the reference target SHOULD be exactly the same as of the `schema` containing the reference. +schemaFormat | `string` | **Required**. A string containing the name of the schema format that is used to define the information. +If `schemaFormat` is missing, it MUST default to `application/vnd.aai.asyncapi+json;version={{asyncapi}}` where `{{version}}` matches the [AsyncAPI Version String](#A2SVersionString). In such a case, this would make the Multiformat Schema Object equivalent to the [Schema Object](#schemaObject). When using [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the resource being referenced MUST match the `schemaFormat` of the schema that contains the initial reference. For example, if you reference Avro `schema`, then `schemaFormat` of referencing resource and the resource being reference MUST match.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using [Reference Objects](#referenceObject) within the schema, the `schemaFormat` of the referenced resource MUST match the `schemaFormat` of the schema containing the reference. schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It MUST match the schema format defined in [`schemaFormat`](#multiFormatSchemaObjectSchemaFormat), including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string. This object MAY be extended with [Specification Extensions](#specificationExtensions). @@ -1903,6 +1904,7 @@ Name | Allowed values | Notes [Avro 1.9.0 schema](https://avro.apache.org/docs/1.9.0/spec.html#schemas) | `application/vnd.apache.avro;version=1.9.0`, `application/vnd.apache.avro+json;version=1.9.0`, `application/vnd.apache.avro+yaml;version=1.9.0` | [OpenAPI 3.0.0 Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject) | `application/vnd.oai.openapi;version=3.0.0`, `application/vnd.oai.openapi+json;version=3.0.0`, `application/vnd.oai.openapi+yaml;version=3.0.0` | [RAML 1.0 data type](https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/) | `application/raml+yaml;version=1.0` | +[Protocol Buffers](https://protobuf.dev/) | `application/vnd.google.protobuf;version=2`, `application/vnd.google.protobuf;version=3` | #### Schema Object From 19f09b32e6f4e0651d0ef4b4fd03ed843f0833cd Mon Sep 17 00:00:00 2001 From: ue85540 Date: Sun, 14 May 2023 10:20:30 +0200 Subject: [PATCH 15/16] spell fix --- spec/asyncapi.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 8c0149f5..0b05b413 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1874,16 +1874,16 @@ components: maximum: 100 ``` -#### Multiformat Schema Object +#### Multi Format Schema Object -The Multiformat Schema Object represents a schema definition. It differs from the [Schema Object](#schemaObject) in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.). +The Multi Format Schema Object represents a schema definition. It differs from the [Schema Object](#schemaObject) in that it supports multiple schema formats or languages (e.g., JSON Schema, Avro, etc.). ##### Fixed Fields Field Name | Type | Description ---|:---:|--- schemaFormat | `string` | **Required**. A string containing the name of the schema format that is used to define the information. -If `schemaFormat` is missing, it MUST default to `application/vnd.aai.asyncapi+json;version={{asyncapi}}` where `{{version}}` matches the [AsyncAPI Version String](#A2SVersionString). In such a case, this would make the Multiformat Schema Object equivalent to the [Schema Object](#schemaObject). When using [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the resource being referenced MUST match the `schemaFormat` of the schema that contains the initial reference. For example, if you reference Avro `schema`, then `schemaFormat` of referencing resource and the resource being reference MUST match.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using [Reference Objects](#referenceObject) within the schema, the `schemaFormat` of the referenced resource MUST match the `schemaFormat` of the schema containing the reference. +If `schemaFormat` is missing, it MUST default to `application/vnd.aai.asyncapi+json;version={{asyncapi}}` where `{{version}}` matches the [AsyncAPI Version String](#A2SVersionString). In such a case, this would make the Multi Format Schema Object equivalent to the [Schema Object](#schemaObject). When using [Reference Object](#referenceObject) within the schema, the `schemaFormat` of the resource being referenced MUST match the `schemaFormat` of the schema that contains the initial reference. For example, if you reference Avro `schema`, then `schemaFormat` of referencing resource and the resource being reference MUST match.

Check out the [supported schema formats table](#multiFormatSchemaFormatTable) for more information. Custom values are allowed but their implementation is OPTIONAL. A custom value MUST NOT refer to one of the schema formats listed in the [table](#multiFormatSchemaFormatTable).

When using [Reference Objects](#referenceObject) within the schema, the `schemaFormat` of the referenced resource MUST match the `schemaFormat` of the schema containing the reference. schema | `any` | **Required**. Definition of the message payload. It can be of any type but defaults to [Schema Object](#schemaObject). It MUST match the schema format defined in [`schemaFormat`](#multiFormatSchemaObjectSchemaFormat), including the encoding type. E.g., Avro should be inlined as either a YAML or JSON object instead of as a string to be parsed as YAML or JSON. Non-JSON-based schemas (e.g., Protobuf or XSD) MUST be inlined as a string. This object MAY be extended with [Specification Extensions](#specificationExtensions). From b151e2d267daff5de8c7ec8b25ff6d6392bdd0b0 Mon Sep 17 00:00:00 2001 From: ue85540 Date: Wed, 24 May 2023 21:26:21 +0200 Subject: [PATCH 16/16] fix Multi Format Schema Object decisiion wording --- spec/asyncapi.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index 0b05b413..e7398958 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -1254,8 +1254,8 @@ Describes a message received on a given channel and operation. Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). -payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +payload | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Definition of the message payload. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1438,7 +1438,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje Field Name | Type | Description ---|:---:|--- messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions. -headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. In case a [Schema Object](#schemaObject) is provided, the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). +headers | [Multi Format Schema Object](#multiFormatSchemaObject) | [Schema Object](#schemaObject) | [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers. If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). correlationId | [Correlation ID Object](#correlationIdObject) | [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching. contentType | `string` | The content type to use when encoding/decoding a message's payload. The value MUST be a specific media type (e.g. `application/json`). When omitted, the value MUST be the one specified on the [defaultContentType](#defaultContentTypeString) field. name | `string` | A machine-friendly name for the message. @@ -1614,7 +1614,7 @@ All objects defined within the components object will have no effect on the API Field Name | Type | Description ---|:---|--- - schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Object](#schemaObject). In case that a [Schema Object](#schemaObject) the `schemaFormat` will be assumed as "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). + schemas | Map[`string`, [Multi Format Schema Object](#multiFormatSchemaObject) \| [Schema Object](#schemaObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Schema Object](#schemaObject). If this is a [Schema Object](#schemaObject), then the `schemaFormat` will be assumed to be "application/vnd.aai.asyncapi+json;version=`asyncapi`" where the version is equal to the [AsyncAPI Version String](#A2SVersionString). servers | Map[`string`, [Server Object](#serverObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Server Objects](#serverObject). channels | Map[`string`, [Channel Object](#channelObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Channel Objects](#channelObject). operations | Map[`string`, [Operation Item Object](#operationObject) \| [Reference Object](#referenceObject)] | An object to hold reusable [Operation Item Objects](#operationObject).