From 6faca8d435674c57039cecd276b70b7b901a67af Mon Sep 17 00:00:00 2001 From: Animesh Kumar Date: Fri, 5 Jul 2024 22:43:21 +0530 Subject: [PATCH] fix: revert back to JSON String representation Changes: - The json pointer library doesn't supports the URI representation, so to reduce the extra work this change was made --- spec/asyncapi.md | 178 +++++++++++++++++++++++------------------------ 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/spec/asyncapi.md b/spec/asyncapi.md index e471ffd4..04a595d3 100644 --- a/spec/asyncapi.md +++ b/spec/asyncapi.md @@ -273,7 +273,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Info Object Example - + ```json { "title": "AsyncAPI Sample App", @@ -301,7 +301,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml title: AsyncAPI Sample App version: 1.0.1 @@ -337,7 +337,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Contact Object Example - + ```json { "name": "API Support", @@ -346,7 +346,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml name: API Support url: https://www.example.com/support @@ -368,7 +368,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### License Object Example - + ```json { "name": "Apache 2.0", @@ -376,7 +376,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html @@ -394,7 +394,7 @@ Field Pattern | Type | Description ##### Servers Object Example - + ```json { "development": { @@ -436,7 +436,7 @@ Field Pattern | Type | Description } ``` - + ```yaml development: host: localhost:5672 @@ -489,7 +489,7 @@ Field Name | Type | Description A single server would be described as: - + ```json { "host": "kafka.in.mycompany.com:9092", @@ -499,7 +499,7 @@ A single server would be described as: } ``` - + ```yaml host: kafka.in.mycompany.com:9092 description: Production Kafka broker. @@ -509,7 +509,7 @@ protocolVersion: '3.2' An example of a server that has a `pathname`: - + ```json { "host": "rabbitmq.in.mycompany.com:5672", @@ -519,7 +519,7 @@ An example of a server that has a `pathname`: } ``` - + ```yaml host: rabbitmq.in.mycompany.com:5672 pathname: /production @@ -544,7 +544,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Server Variable Object Example - + ```json { "host": "rabbitmq.in.mycompany.com:5672", @@ -563,7 +563,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml host: 'rabbitmq.in.mycompany.com:5672' pathname: '/{env}' @@ -585,14 +585,14 @@ In case a message can't be encoded/decoded using this value, schema parsers MUST ##### Default Content Type Example - + ```json { "defaultContentType": "application/json" } ``` - + ```yaml defaultContentType: application/json ``` @@ -609,7 +609,7 @@ Field Pattern | Type | Description ##### Channels Object Example - + ```json { "userSignedUp": { @@ -623,7 +623,7 @@ Field Pattern | Type | Description } ``` - + ```yaml userSignedUp: address: 'user.signedup' @@ -655,7 +655,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Channel Object Example - + ```json { "address": "users.{userId}", @@ -697,7 +697,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml address: 'users.{userId}' title: Users channel @@ -744,7 +744,7 @@ Field Pattern | Type | Description ##### Messages Object Example - + ```json { "userSignedUp": { @@ -756,7 +756,7 @@ Field Pattern | Type | Description } ``` - + ```yaml userSignedUp: $ref: '#/components/messages/userSignedUp' @@ -778,7 +778,7 @@ Field Pattern | Type | Description ##### Operations Object Example - + ```json { "onUserSignUp": { @@ -806,7 +806,7 @@ Field Pattern | Type | Description } ``` - + ```yaml onUserSignUp: title: User sign up @@ -851,7 +851,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Operation Object Example - + ```json { "title": "User sign up", @@ -912,7 +912,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml title: User sign up summary: Action to sign a user up. @@ -975,7 +975,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Operation Trait Object Example - + ```json { "bindings": { @@ -986,7 +986,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml bindings: amqp: @@ -1024,7 +1024,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Examples - + ```json { "description": "Consumer inbox", @@ -1032,7 +1032,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml description: Consumer Inbox location: $message.header#/replyTo @@ -1052,7 +1052,7 @@ Field Pattern | Type | Description ##### Parameters Object Example - + ```json { "address": "user/{userId}/signedup", @@ -1064,7 +1064,7 @@ Field Pattern | Type | Description } ``` - + ```yaml address: user/{userId}/signedup parameters: @@ -1090,7 +1090,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Parameter Object Example - + ```json { "address": "user/{userId}/signedup", @@ -1103,7 +1103,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml address: user/{userId}/signedup parameters: @@ -1258,7 +1258,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Message Object Example - + ```json { "name": "UserSignup", @@ -1323,7 +1323,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml name: UserSignup title: User signup @@ -1370,7 +1370,7 @@ examples: Example using Avro to define the payload: - + ```json { "name": "UserSignup", @@ -1391,7 +1391,7 @@ Example using Avro to define the payload: } ``` - + ```yaml name: UserSignup title: User signup @@ -1433,14 +1433,14 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Message Trait Object Example - + ```json { "contentType": "application/json" } ``` - + ```yaml contentType: application/json ``` @@ -1462,7 +1462,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Message Example Object Example - + ```json { "name": "SimpleSignup", @@ -1482,7 +1482,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml name: SimpleSignup summary: A simple UserSignup example message @@ -1516,7 +1516,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Tag Object Example - + ```json { "name": "user", @@ -1524,7 +1524,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml name: user description: User-related messages @@ -1545,7 +1545,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### External Documentation Object Example - + ```json { "description": "Find more info here", @@ -1553,7 +1553,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml description: Find more info here url: https://example.com @@ -1577,14 +1577,14 @@ This object cannot be extended with additional properties and any properties add ##### Reference Object Example - + ```json { "$ref": "#/components/schemas/Pet" } ``` - + ```yaml $ref: '#/components/schemas/Pet' ``` @@ -1634,7 +1634,7 @@ my.org.User ##### Components Object Example - + ```json { "components": { @@ -1768,7 +1768,7 @@ my.org.User } ``` - + ```yaml components: schemas: @@ -1896,7 +1896,7 @@ Name | Allowed values | Notes ###### Multi Format Schema Object Example with Avro - + ```yaml channels: example: @@ -2002,7 +2002,7 @@ As such, inline schema definitions, which do not have a given id, _cannot_ be us ###### Primitive Sample - + ```json { "type": "string", @@ -2010,7 +2010,7 @@ As such, inline schema definitions, which do not have a given id, _cannot_ be us } ``` - + ```yaml type: string format: email @@ -2018,7 +2018,7 @@ format: email ###### Simple Model - + ```json { "type": "object", @@ -2041,7 +2041,7 @@ format: email } ``` - + ```yaml type: object required: @@ -2061,7 +2061,7 @@ properties: For a simple string to string mapping: - + ```json { "type": "object", @@ -2071,7 +2071,7 @@ For a simple string to string mapping: } ``` - + ```yaml type: object additionalProperties: @@ -2080,7 +2080,7 @@ additionalProperties: For a string to model mapping: - + ```json { "type": "object", @@ -2090,7 +2090,7 @@ For a string to model mapping: } ``` - + ```yaml type: object additionalProperties: @@ -2099,7 +2099,7 @@ additionalProperties: ###### Model with Example - + ```json { "type": "object", @@ -2124,7 +2124,7 @@ additionalProperties: } ``` - + ```yaml type: object properties: @@ -2142,7 +2142,7 @@ examples: ###### Model with Boolean Schemas - + ```json { "type": "object", @@ -2156,7 +2156,7 @@ examples: } ``` - + ```yaml type: object required: @@ -2168,7 +2168,7 @@ properties: ###### Models with Composition - + ```json { "schemas": { @@ -2211,7 +2211,7 @@ properties: } ``` - + ```yaml schemas: ErrorModel: @@ -2239,7 +2239,7 @@ schemas: ###### Models with Polymorphism Support - + ```json { "schemas": { @@ -2333,7 +2333,7 @@ schemas: } ``` - + ```yaml schemas: Pet: @@ -2431,21 +2431,21 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ###### User/Password Authentication Sample - + ```json { "type": "userPassword" } ``` - + ```yaml type: userPassword ``` ###### API Key Authentication Sample - + ```json { "type": "apiKey", @@ -2453,7 +2453,7 @@ type: userPassword } ``` - + ```yaml type: apiKey in: user @@ -2461,35 +2461,35 @@ in: user ###### X.509 Authentication Sample - + ```json { "type": "X509" } ``` - + ```yaml type: X509 ``` ###### End-to-end Encryption Authentication Sample - + ```json { "type": "symmetricEncryption" } ``` - + ```yaml type: symmetricEncryption ``` ###### Basic Authentication Sample - + ```json { "type": "http", @@ -2497,7 +2497,7 @@ type: symmetricEncryption } ``` - + ```yaml type: http scheme: basic @@ -2505,7 +2505,7 @@ scheme: basic ###### API Key Sample - + ```json { "type": "httpApiKey", @@ -2514,7 +2514,7 @@ scheme: basic } ``` - + ```yaml type: httpApiKey name: api_key @@ -2523,7 +2523,7 @@ in: header ###### JWT Bearer Sample - + ```json { "type": "http", @@ -2532,7 +2532,7 @@ in: header } ``` - + ```yaml type: http scheme: bearer @@ -2541,7 +2541,7 @@ bearerFormat: JWT ###### Implicit OAuth2 Sample - + ```json { "type": "oauth2", @@ -2560,7 +2560,7 @@ bearerFormat: JWT } ``` - + ```yaml type: oauth2 flows: @@ -2575,14 +2575,14 @@ scopes: ###### SASL Sample - + ```json { "type": "scramSha512" } ``` - + ```yaml type: scramSha512 ``` @@ -2621,7 +2621,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ###### clientCredentials Oauth Flow Object Example - + ```json { "tokenUrl": "https://example.com/api/oauth/token", @@ -2631,7 +2631,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } } ``` - + ```yaml tokenUrl: https://example.com/api/oauth/token availableScopes: @@ -2656,7 +2656,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens ##### Examples - + ```json { "description": "Default Correlation ID", @@ -2664,7 +2664,7 @@ This object MAY be extended with [Specification Extensions](#specificationExtens } ``` - + ```yaml description: Default Correlation ID location: $message.header#/correlationId