From 4841cf5c0d75be96706b4bb3ddbe24e9de9db5ba Mon Sep 17 00:00:00 2001 From: Jonas Lagoni Date: Tue, 25 Jul 2023 15:06:39 +0200 Subject: [PATCH] feat: adapt HTTP bindings to v3 (#204) --- http/README.md | 57 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/http/README.md b/http/README.md index fbdda833..7bb371d1 100644 --- a/http/README.md +++ b/http/README.md @@ -6,7 +6,7 @@ This document defines how to describe HTTP-specific information on AsyncAPI. ## Version -Current version is `0.1.0`. +Current version is `0.2.0`. @@ -15,9 +15,6 @@ Current version is `0.1.0`. This object MUST NOT contain any properties. Its name is reserved for future use. - - - ## Channel Binding Object @@ -28,14 +25,13 @@ This object MUST NOT contain any properties. Its name is reserved for future use ## Operation Binding Object - + ##### Fixed Fields Field Name | Type | Description ---|:---:|--- -`type` | string | **REQUIRED**. Type of operation. Its value MUST be either `request` or `response`. -`method` | string | When `type` is `request`, this is the HTTP method, otherwise it MUST be ignored. Its value MUST be one of `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`, `CONNECT`, and `TRACE`. -`query` | [Schema Object][schemaObject] | A Schema object containing the definitions for each query parameter. This schema MUST be of type `object` and have a `properties` key. +`method` | string | The HTTP method for the request. Its value MUST be one of `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD`, `OPTIONS`, `CONNECT`, and `TRACE`. +`query` | [Schema Object][schemaObject] | A Schema object containing the definitions for each query parameter. This schema MUST be of type object and have a properties key. `bindingVersion` | string | The version of this binding. If omitted, "latest" MUST be assumed. This object MUST contain only the properties defined above. @@ -44,23 +40,25 @@ This object MUST contain only the properties defined above. ```yaml channels: - /employees: - subscribe: - bindings: - http: - type: request - method: GET - query: - type: object - required: - - companyId - properties: - companyId: - type: number - minimum: 1 - description: The Id of the company. - additionalProperties: false - bindingVersion: '0.1.0' + employees: + address: /employees +operations: + employees: + action: send: + bindings: + http: + method: GET + query: + type: object + required: + - companyId + properties: + companyId: + type: number + minimum: 1 + description: The Id of the company. + additionalProperties: false + bindingVersion: '0.2.0' ``` @@ -83,8 +81,9 @@ This object MUST contain only the properties defined above. ```yaml channels: test: - publish: - message: + address: /test + messages: + testMessage: bindings: http: headers: @@ -93,7 +92,7 @@ channels: Content-Type: type: string enum: ['application/json'] - bindingVersion: '0.1.0' + bindingVersion: '0.2.0' ``` -[schemaObject]: https://www.asyncapi.com/docs/specifications/2.0.0/#schemaObject \ No newline at end of file +[schemaObject]: https://www.asyncapi.com/docs/specifications/latest/#schemaObject \ No newline at end of file