From 34d4d47dfdcff56854fdb0d96fb8c166dca0c220 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 22 Jun 2023 16:04:16 +0200 Subject: [PATCH 1/7] initial change --- examples/adeo-kafka-request-reply.yml | 6 +- examples/anyof.yml | 25 +-- examples/application-headers.yml | 52 +++--- examples/correlation-id.yml | 122 +++++++++----- examples/gitter-streaming.yml | 234 +++++++++++++------------- examples/mercure.yml | 44 +++-- examples/not.yml | 21 ++- examples/oneof.yml | 53 +++--- 8 files changed, 322 insertions(+), 235 deletions(-) diff --git a/examples/adeo-kafka-request-reply.yml b/examples/adeo-kafka-request-reply.yml index 76fca663b..f470e276b 100644 --- a/examples/adeo-kafka-request-reply.yml +++ b/examples/adeo-kafka-request-reply.yml @@ -64,9 +64,9 @@ channels: kafka: replicas: 3 partitions: 3 - topicConfiguration - cleanup.policy: delete - retention.ms: 7 days + topicConfiguration: + cleanup.policy: delete + retention.ms: 7 days messages: costingRequest: $ref: "#/components/messages/costingRequestV1" diff --git a/examples/anyof.yml b/examples/anyof.yml index a73ac4090..97492ed99 100644 --- a/examples/anyof.yml +++ b/examples/anyof.yml @@ -1,22 +1,27 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: AnyOf example - version: '1.0.0' - + version: 1.0.0 channels: test: - publish: - message: + address: test + messages: + publish.message: $ref: '#/components/messages/testMessages' - +operations: + test.publish: + action: receive + channel: + $ref: '#/channels/test' + messages: + - $ref: '#/components/messages/testMessages' components: messages: testMessages: payload: - anyOf: # anyOf in payload schema - - $ref: "#/components/schemas/objectWithKey" - - $ref: "#/components/schemas/objectWithKey2" - + anyOf: + - $ref: '#/components/schemas/objectWithKey' + - $ref: '#/components/schemas/objectWithKey2' schemas: objectWithKey: type: object diff --git a/examples/application-headers.yml b/examples/application-headers.yml index 0ebe339d1..5dceb710c 100644 --- a/examples/application-headers.yml +++ b/examples/application-headers.yml @@ -1,15 +1,15 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Application Headers example - version: '1.0.0' - description: A cut of the Streetlights API to test application header changes supporting #112 + version: 1.0.0 + description: A cut of the Streetlights API to test application header changes supporting license: name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - + url: 'https://www.apache.org/licenses/LICENSE-2.0' +defaultContentType: application/json servers: production: - url: test.mosquitto.org:{port} + host: 'test.mosquitto.org:{port}' protocol: mqtt description: Test broker variables: @@ -19,28 +19,36 @@ servers: enum: - '1883' - '8883' - -defaultContentType: application/json - channels: - smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured: + 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured': + address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + messages: + receiveLightMeasurement.message: + $ref: '#/components/messages/lightMeasured' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - publish: - summary: Inform about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - message: - $ref: '#/components/messages/lightMeasured' - +operations: + receiveLightMeasurement: + action: receive + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1event~1{streetlightId}~1lighting~1measured + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. + messages: + - $ref: '#/components/messages/lightMeasured' components: messages: lightMeasured: name: lightMeasured title: Light measured - summary: Inform about environmental lighting conditions of a particular streetlight. + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. correlationId: - location: "$message.header#/MQMD/CorrelId" + location: $message.header#/MQMD/CorrelId contentType: application/json headers: type: object @@ -54,10 +62,9 @@ components: maxLength: 24 format: binary applicationInstanceId: - $ref: "#/components/schemas/applicationInstanceId" + $ref: '#/components/schemas/applicationInstanceId' payload: - $ref: "#/components/schemas/lightMeasuredPayload" - + $ref: '#/components/schemas/lightMeasuredPayload' schemas: lightMeasuredPayload: type: object @@ -67,7 +74,7 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' sentAt: type: string format: date-time @@ -75,7 +82,6 @@ components: applicationInstanceId: description: Unique identifier for a given instance of the publishing application type: string - parameters: streetlightId: description: The ID of the streetlight. diff --git a/examples/correlation-id.yml b/examples/correlation-id.yml index 33bb2770e..f6048d1f2 100644 --- a/examples/correlation-id.yml +++ b/examples/correlation-id.yml @@ -1,15 +1,15 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Correlation ID Example - version: '1.0.0' + version: 1.0.0 description: A cut of the Streetlights API to test Correlation ID license: name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - + url: 'https://www.apache.org/licenses/LICENSE-2.0' +defaultContentType: application/json servers: production: - url: test.mosquitto.org:{port} + host: 'test.mosquitto.org:{port}' protocol: mqtt description: Test broker variables: @@ -20,55 +20,97 @@ servers: - '1883' - '8883' security: - - apiKey: [] - - supportedOauthFlows: - - streetlights:on - - streetlights:off - - streetlights:dim - - openIdConnectWellKnown: [] - -defaultContentType: application/json - + - $ref: '#/components/securitySchemes/apiKey' + - type: oauth2 + description: Flows to support OAuth 2.0 + flows: + implicit: + authorizationUrl: 'https://authserver.example/auth' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + password: + tokenUrl: 'https://authserver.example/token' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + clientCredentials: + tokenUrl: 'https://authserver.example/token' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + authorizationCode: + authorizationUrl: 'https://authserver.example/auth' + tokenUrl: 'https://authserver.example/token' + refreshUrl: 'https://authserver.example/refresh' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + scopes: + - 'streetlights:on' + - 'streetlights:off' + - 'streetlights:dim' + - $ref: '#/components/securitySchemes/openIdConnectWellKnown' channels: - smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured: + 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured': + address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + messages: + receiveLightMeasurement.message: + $ref: '#/components/messages/lightMeasured' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - publish: - summary: Inform about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - message: - $ref: '#/components/messages/lightMeasured' - - smartylighting/streetlights/1/0/action/{streetlightId}/dim: + 'smartylighting/streetlights/1/0/action/{streetlightId}/dim': + address: 'smartylighting/streetlights/1/0/action/{streetlightId}/dim' + messages: + dimLight.message: + $ref: '#/components/messages/dimLight' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: dimLight - message: - $ref: '#/components/messages/dimLight' - +operations: + receiveLightMeasurement: + action: receive + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1event~1{streetlightId}~1lighting~1measured + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. + messages: + - $ref: '#/components/messages/lightMeasured' + dimLight: + action: send + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1dim + messages: + - $ref: '#/components/messages/dimLight' components: messages: lightMeasured: name: lightMeasured title: Light measured - summary: Inform about environmental lighting conditions of a particular streetlight. + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. correlationId: - location: "$message.header#/MQMD/CorrelId" + location: $message.header#/MQMD/CorrelId contentType: application/json payload: - $ref: "#/components/schemas/lightMeasuredPayload" + $ref: '#/components/schemas/lightMeasuredPayload' dimLight: name: dimLight title: Dim light summary: Command a particular streetlight to dim the lights. correlationId: - $ref: "#/components/correlationIds/sentAtCorrelator" + $ref: '#/components/correlationIds/sentAtCorrelator' payload: - $ref: "#/components/schemas/dimLightPayload" - + $ref: '#/components/schemas/dimLightPayload' schemas: lightMeasuredPayload: type: object @@ -78,7 +120,7 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' dimLightPayload: type: object properties: @@ -88,18 +130,16 @@ components: minimum: 0 maximum: 100 sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' sentAt: type: string format: date-time description: Date and time when the message was sent. - parameters: streetlightId: description: The ID of the streetlight. schema: type: string - correlationIds: sentAtCorrelator: description: Data from message payload used as correlation ID @@ -115,19 +155,19 @@ components: flows: implicit: authorizationUrl: 'https://authserver.example/auth' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights password: tokenUrl: 'https://authserver.example/token' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights clientCredentials: tokenUrl: 'https://authserver.example/token' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights @@ -135,7 +175,7 @@ components: authorizationUrl: 'https://authserver.example/auth' tokenUrl: 'https://authserver.example/token' refreshUrl: 'https://authserver.example/refresh' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights diff --git a/examples/gitter-streaming.yml b/examples/gitter-streaming.yml index 1d53a01bb..57a8eaabe 100644 --- a/examples/gitter-streaming.yml +++ b/examples/gitter-streaming.yml @@ -1,19 +1,24 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 id: 'tag:stream.gitter.im,2022:api' info: title: Gitter Streaming API - version: '1.0.0' - + version: 1.0.0 servers: production: - url: https://stream.gitter.im/v1 + host: stream.gitter.im + pathname: /v1 protocol: https protocolVersion: '1.1' security: - - httpBearerToken: [] - + - $ref: '#/components/securitySchemes/httpBearerToken' channels: - /rooms/{roomId}/{resource}: + '/rooms/{roomId}/{resource}': + address: '/rooms/{roomId}/{resource}' + messages: + subscribe.message.0: + $ref: '#/components/messages/chatMessage' + subscribe.message.1: + $ref: '#/components/messages/heartbeat' parameters: roomId: description: Id of the Gitter room. @@ -28,15 +33,17 @@ channels: enum: - chatMessages - events - subscribe: - bindings: - http: - type: response - message: - oneOf: - - $ref: '#/components/messages/chatMessage' - - $ref: '#/components/messages/heartbeat' - +operations: + '/rooms/{roomId}/{resource}.subscribe': + action: send + channel: + $ref: '#/channels/~1rooms~1{roomId}~1{resource}' + bindings: + http: + type: response + messages: + - $ref: '#/components/messages/chatMessage' + - $ref: '#/components/messages/heartbeat' components: securitySchemes: httpBearerToken: @@ -44,121 +51,122 @@ components: scheme: bearer messages: chatMessage: - schemaFormat: 'application/schema+yaml;version=draft-07' summary: >- - A message represents an individual chat message sent to a room. - They are a sub-resource of a room. + A message represents an individual chat message sent to a room. They are + a sub-resource of a room. payload: - type: object - properties: - id: - type: string - description: ID of the message. - text: - type: string - description: Original message in plain-text/markdown. - html: - type: string - description: HTML formatted message. - sent: - type: string - format: date-time - description: ISO formatted date of the message. - fromUser: - type: object - description: User that sent the message. - properties: - id: - type: string - description: Gitter User ID. - username: - type: string - description: Gitter/GitHub username. - displayName: - type: string - description: Gitter/GitHub user real name. - url: - type: string - description: Path to the user on Gitter. - avatarUrl: - type: string - format: uri - description: User avatar URI. - avatarUrlSmall: - type: string - format: uri - description: User avatar URI (small). - avatarUrlMedium: - type: string - format: uri - description: User avatar URI (medium). - v: - type: number - description: Version. - gv: - type: string - description: Stands for "Gravatar version" and is used for cache busting. - unread: - type: boolean - description: Boolean that indicates if the current user has read the message. - readBy: - type: number - description: Number of users that have read the message. - urls: - type: array - description: List of URLs present in the message. - items: + schemaFormat: application/schema+yaml;version=draft-07 + schema: + type: object + properties: + id: + type: string + description: ID of the message. + text: + type: string + description: Original message in plain-text/markdown. + html: + type: string + description: HTML formatted message. + sent: type: string - format: uri - mentions: - type: array - description: List of @Mentions in the message. - items: + format: date-time + description: ISO formatted date of the message. + fromUser: type: object + description: User that sent the message. properties: - screenName: + id: type: string - userId: + description: Gitter User ID. + username: type: string - userIds: - type: array - items: - type: string - issues: - type: array - description: 'List of #Issues referenced in the message.' - items: - type: object - properties: - number: + description: Gitter/GitHub username. + displayName: + type: string + description: Gitter/GitHub user real name. + url: + type: string + description: Path to the user on Gitter. + avatarUrl: type: string - meta: - type: array - description: Metadata. This is currently not used for anything. - items: {} - v: - type: number - description: Version. - gv: - type: string - description: Stands for "Gravatar version" and is used for cache busting. + format: uri + description: User avatar URI. + avatarUrlSmall: + type: string + format: uri + description: User avatar URI (small). + avatarUrlMedium: + type: string + format: uri + description: User avatar URI (medium). + v: + type: number + description: Version. + gv: + type: string + description: Stands for "Gravatar version" and is used for cache busting. + unread: + type: boolean + description: Boolean that indicates if the current user has read the message. + readBy: + type: number + description: Number of users that have read the message. + urls: + type: array + description: List of URLs present in the message. + items: + type: string + format: uri + mentions: + type: array + description: List of @Mentions in the message. + items: + type: object + properties: + screenName: + type: string + userId: + type: string + userIds: + type: array + items: + type: string + issues: + type: array + description: 'List of #Issues referenced in the message.' + items: + type: object + properties: + number: + type: string + meta: + type: array + description: Metadata. This is currently not used for anything. + items: {} + v: + type: number + description: Version. + gv: + type: string + description: Stands for "Gravatar version" and is used for cache busting. bindings: http: $ref: '#/components/messageBindings/streamingHeaders' - heartbeat: - schemaFormat: 'application/schema+yaml;version=draft-07' summary: Its purpose is to keep the connection alive. payload: - type: string - enum: ["\r\n"] + schemaFormat: application/schema+yaml;version=draft-07 + schema: + type: string + enum: + - "\r\n" bindings: http: $ref: '#/components/messageBindings/streamingHeaders' - messageBindings: streamingHeaders: http: headers: - 'Transfer-Encoding': 'chunked' - Trailer: '\r\n' + Transfer-Encoding: chunked + Trailer: \r\n diff --git a/examples/mercure.yml b/examples/mercure.yml index 388f4dbc1..91bd55394 100644 --- a/examples/mercure.yml +++ b/examples/mercure.yml @@ -1,37 +1,49 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Mercure Hub Example - version: '1.0.0' + version: 1.0.0 description: This example demonstrates how to define a Mercure hub. - -# While not mandatory, it's a best practice to use formats with hypermedia capabilities such as JSON-LD, Atom or HTML with the Mercure protocol defaultContentType: application/ld+json - servers: production: - url: https://demo.mercure.rocks/.well-known/mercure + host: demo.mercure.rocks + pathname: /.well-known/mercure protocol: mercure - channels: 'https://example.com/books/{id}': - description: Every time a resource of type `http://schema.org/Book` is created or modified, a JSON-LD representation of the new version of this resource must be pushed in this Mercure topic. + address: 'https://example.com/books/{id}' + messages: + publish.message: + $ref: '#/components/messages/book' + subscribe.message: + $ref: '#/components/messages/book' + description: >- + Every time a resource of type `http://schema.org/Book` is created or + modified, a JSON-LD representation of the new version of this resource + must be pushed in this Mercure topic. parameters: id: schema: type: integer - subscribe: - message: - $ref: '#/components/messages/book' - publish: - message: - $ref: '#/components/messages/book' - +operations: + 'https://example.com/books/{id}.publish': + action: receive + channel: + $ref: '#/channels/https:~1~1example.com~1books~1{id}' + messages: + - $ref: '#/components/messages/book' + 'https://example.com/books/{id}.subscribe': + action: send + channel: + $ref: '#/channels/https:~1~1example.com~1books~1{id}' + messages: + - $ref: '#/components/messages/book' components: messages: book: summary: The content of a book resource. externalDocs: - url: https://schema.org/Book + url: 'https://schema.org/Book' payload: type: object properties: diff --git a/examples/not.yml b/examples/not.yml index 0b4e2e716..0dd2cad1d 100644 --- a/examples/not.yml +++ b/examples/not.yml @@ -1,20 +1,25 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Not example - version: '1.0.0' - + version: 1.0.0 channels: test: - publish: - message: + address: test + messages: + publish.message: $ref: '#/components/messages/testMessages' - +operations: + test.publish: + action: receive + channel: + $ref: '#/channels/test' + messages: + - $ref: '#/components/messages/testMessages' components: messages: testMessages: payload: - $ref: "#/components/schemas/testSchema" - + $ref: '#/components/schemas/testSchema' schemas: testSchema: type: object diff --git a/examples/oneof.yml b/examples/oneof.yml index 6bc4c92e3..2df5f6eea 100644 --- a/examples/oneof.yml +++ b/examples/oneof.yml @@ -1,38 +1,49 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: OneOf example - version: '1.0.0' - + version: 1.0.0 channels: test: - publish: - message: + address: test + messages: + publish.message: $ref: '#/components/messages/testMessages' - test2: - subscribe: - message: - # Use oneOf here if different messages are published on test2 topic. - oneOf: - - payload: - $ref: "#/components/schemas/objectWithKey" - - payload: - $ref: "#/components/schemas/objectWithKey2" - + address: test2 + messages: + subscribe.message.0: + payload: + $ref: '#/components/schemas/objectWithKey' + subscribe.message.1: + payload: + $ref: '#/components/schemas/objectWithKey2' +operations: + test.publish: + action: receive + channel: + $ref: '#/channels/test' + messages: + - $ref: '#/components/messages/testMessages' + test2.subscribe: + action: send + channel: + $ref: '#/channels/test2' + messages: + - $ref: '#/channels/test2/messages/subscribe.message.0' + - $ref: '#/channels/test2/messages/subscribe.message.1' components: messages: testMessages: payload: - oneOf: # oneOf in payload schema - - $ref: "#/components/schemas/objectWithKey" - - $ref: "#/components/schemas/objectWithKey2" + oneOf: + - $ref: '#/components/schemas/objectWithKey' + - $ref: '#/components/schemas/objectWithKey2' testMessage1: payload: - $ref: "#/components/schemas/objectWithKey" + $ref: '#/components/schemas/objectWithKey' testMessage2: payload: - $ref: "#/components/schemas/objectWithKey2" - + $ref: '#/components/schemas/objectWithKey2' schemas: objectWithKey: type: object From 06788143f846933651baefd2fc7c393e629d3640 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 22 Jun 2023 16:10:04 +0200 Subject: [PATCH 2/7] update examples --- examples/operation-security.yml | 57 +- examples/rpc-client.yml | 76 +- examples/rpc-server.yml | 70 +- examples/simple.yml | 14 +- examples/slack-rtm.yml | 316 ++-- examples/streetlights-kafka.yml | 172 +- examples/streetlights-mqtt.yml | 199 ++- examples/streetlights-operation-security.yml | 233 +-- examples/websocket-gemini.yml | 256 ++- scripts/converter/README.md | 1 + scripts/converter/index.js | 34 + scripts/converter/package-lock.json | 1561 ++++++++++++++++++ scripts/converter/package.json | 12 + 13 files changed, 2468 insertions(+), 533 deletions(-) create mode 100644 scripts/converter/README.md create mode 100644 scripts/converter/index.js create mode 100644 scripts/converter/package-lock.json create mode 100644 scripts/converter/package.json diff --git a/examples/operation-security.yml b/examples/operation-security.yml index f853072b2..99d959467 100644 --- a/examples/operation-security.yml +++ b/examples/operation-security.yml @@ -1,29 +1,44 @@ -asyncapi: 2.5.0 +asyncapi: 3.0.0 info: title: Notifications version: 1.0.0 description: >- - This contract defines HTTP Push notification for - application authorization revocation topic + This contract defines HTTP Push notification for application authorization + revocation topic channels: AUTHORIZATION_REVOCATION: - subscribe: - message: + address: AUTHORIZATION_REVOCATION + messages: + subscribe.message: $ref: '#/components/messages/message' - bindings: - http: - type: request - method: POST - headers: - type: object - properties: - Content-Type: - type: string - enum: - - application/json - security: - petstore_auth: - - subscribe:auth_revocations +operations: + AUTHORIZATION_REVOCATION.subscribe: + action: send + channel: + $ref: '#/channels/AUTHORIZATION_REVOCATION' + security: + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'subscribe:auth_revocations': Scope required for authorization revocation topic + scopes: + - 'subscribe:auth_revocations' + bindings: + http: + type: request + method: POST + headers: + type: object + properties: + Content-Type: + type: string + enum: + - application/json + messages: + - $ref: '#/components/messages/message' components: messages: message: @@ -102,5 +117,5 @@ components: flows: clientCredentials: tokenUrl: 'https://example.com/api/oauth/dialog' - scopes: - subscribe:auth_revocations: Scope required for authorization revocation topic + availableScopes: + 'subscribe:auth_revocations': Scope required for authorization revocation topic diff --git a/examples/rpc-client.yml b/examples/rpc-client.yml index 68f5d8014..bdd7fde7c 100644 --- a/examples/rpc-client.yml +++ b/examples/rpc-client.yml @@ -1,35 +1,19 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 id: 'urn:example:rpcclient' -defaultContentType: application/json - info: title: RPC Client Example + version: 1.0.0 description: This example demonstrates how to define an RPC client. - version: '1.0.0' - +defaultContentType: application/json servers: production: - url: rabbitmq.example.org + host: rabbitmq.example.org protocol: amqp - channels: '{queue}': - parameters: - queue: - schema: - type: string - pattern: '^amq\\.gen\\-.+$' - bindings: - amqp: - is: queue - queue: - exclusive: true - publish: - operationId: receiveSumResult - bindings: - amqp: - ack: false - message: + address: '{queue}' + messages: + receiveSumResult.message: correlationId: location: $message.header#/correlation_id payload: @@ -39,19 +23,20 @@ channels: type: number examples: - 7 - - rpc_queue: + parameters: + queue: + schema: + type: string + pattern: ^amq\\.gen\\-.+$ bindings: amqp: is: queue queue: - durable: false - subscribe: - operationId: requestSum - bindings: - amqp: - ack: true - message: + exclusive: true + rpc_queue: + address: rpc_queue + messages: + requestSum.message: bindings: amqp: replyTo: @@ -66,4 +51,29 @@ channels: items: type: number examples: - - [4,3] + - - 4 + - 3 + bindings: + amqp: + is: queue + queue: + durable: false +operations: + receiveSumResult: + action: receive + channel: + $ref: '#/channels/{queue}' + bindings: + amqp: + ack: false + messages: + - $ref: '#/channels/{queue}/messages/receiveSumResult.message' + requestSum: + action: send + channel: + $ref: '#/channels/rpc_queue' + bindings: + amqp: + ack: true + messages: + - $ref: '#/channels/rpc_queue/messages/requestSum.message' diff --git a/examples/rpc-server.yml b/examples/rpc-server.yml index de4896eb6..f53ca1b9d 100644 --- a/examples/rpc-server.yml +++ b/examples/rpc-server.yml @@ -1,35 +1,19 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 id: 'urn:example:rpcserver' -defaultContentType: application/json - info: title: RPC Server Example + version: 1.0.0 description: This example demonstrates how to define an RPC server. - version: '1.0.0' - +defaultContentType: application/json servers: production: - url: rabbitmq.example.org + host: rabbitmq.example.org protocol: amqp - channels: '{queue}': - parameters: - queue: - schema: - type: string - pattern: '^amq\\.gen\\-.+$' - bindings: - amqp: - is: queue - queue: - exclusive: true - subscribe: - operationId: sendSumResult - bindings: - amqp: - ack: true - message: + address: '{queue}' + messages: + sendSumResult.message: correlationId: location: $message.header#/correlation_id payload: @@ -39,16 +23,20 @@ channels: type: number examples: - 7 - - rpc_queue: + parameters: + queue: + schema: + type: string + pattern: ^amq\\.gen\\-.+$ bindings: amqp: is: queue queue: - durable: false - publish: - operationId: sum - message: + exclusive: true + rpc_queue: + address: rpc_queue + messages: + sum.message: bindings: amqp: replyTo: @@ -63,4 +51,26 @@ channels: items: type: number examples: - - [4,3] + - - 4 + - 3 + bindings: + amqp: + is: queue + queue: + durable: false +operations: + sendSumResult: + action: send + channel: + $ref: '#/channels/{queue}' + bindings: + amqp: + ack: true + messages: + - $ref: '#/channels/{queue}/messages/sendSumResult.message' + sum: + action: receive + channel: + $ref: '#/channels/rpc_queue' + messages: + - $ref: '#/channels/rpc_queue/messages/sum.message' diff --git a/examples/simple.yml b/examples/simple.yml index 329d5073b..f72ea6ece 100644 --- a/examples/simple.yml +++ b/examples/simple.yml @@ -1,13 +1,21 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Account Service version: 1.0.0 description: This service is in charge of processing user signups channels: user/signedup: - subscribe: - message: + address: user/signedup + messages: + subscribe.message: $ref: '#/components/messages/UserSignedUp' +operations: + user/signedup.subscribe: + action: send + channel: + $ref: '#/channels/user~1signedup' + messages: + - $ref: '#/components/messages/UserSignedUp' components: messages: UserSignedUp: diff --git a/examples/slack-rtm.yml b/examples/slack-rtm.yml index 20234a2bb..4de2a3c8f 100644 --- a/examples/slack-rtm.yml +++ b/examples/slack-rtm.yml @@ -1,79 +1,178 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 id: 'wss://wss-primary.slack.com/websocket' info: title: Slack Real Time Messaging API - version: '1.0.0' - + version: 1.0.0 servers: production: - url: https://slack.com/api/rtm.connect + host: slack.com + pathname: /api/rtm.connect protocol: https protocolVersion: '1.1' security: - - token: [] - + - $ref: '#/components/securitySchemes/token' channels: /: - publish: - message: + address: / + messages: + publish.message: $ref: '#/components/messages/outgoingMessage' - subscribe: - message: - oneOf: - - $ref: '#/components/messages/hello' - - $ref: '#/components/messages/connectionError' - - $ref: '#/components/messages/accountsChanged' - - $ref: '#/components/messages/botAdded' - - $ref: '#/components/messages/botChanged' - - $ref: '#/components/messages/channelArchive' - - $ref: '#/components/messages/channelCreated' - - $ref: '#/components/messages/channelDeleted' - - $ref: '#/components/messages/channelHistoryChanged' - - $ref: '#/components/messages/channelJoined' - - $ref: '#/components/messages/channelLeft' - - $ref: '#/components/messages/channelMarked' - - $ref: '#/components/messages/channelRename' - - $ref: '#/components/messages/channelUnarchive' - - $ref: '#/components/messages/commandsChanged' - - $ref: '#/components/messages/dndUpdated' - - $ref: '#/components/messages/dndUpdatedUser' - - $ref: '#/components/messages/emailDomainChanged' - - $ref: '#/components/messages/emojiRemoved' - - $ref: '#/components/messages/emojiAdded' - - $ref: '#/components/messages/fileChange' - - $ref: '#/components/messages/fileCommentAdded' - - $ref: '#/components/messages/fileCommentDeleted' - - $ref: '#/components/messages/fileCommentEdited' - - $ref: '#/components/messages/fileCreated' - - $ref: '#/components/messages/fileDeleted' - - $ref: '#/components/messages/filePublic' - - $ref: '#/components/messages/fileShared' - - $ref: '#/components/messages/fileUnshared' - - $ref: '#/components/messages/goodbye' - - $ref: '#/components/messages/groupArchive' - - $ref: '#/components/messages/groupClose' - - $ref: '#/components/messages/groupHistoryChanged' - - $ref: '#/components/messages/groupJoined' - - $ref: '#/components/messages/groupLeft' - - $ref: '#/components/messages/groupMarked' - - $ref: '#/components/messages/groupOpen' - - $ref: '#/components/messages/groupRename' - - $ref: '#/components/messages/groupUnarchive' - - $ref: '#/components/messages/imClose' - - $ref: '#/components/messages/imCreated' - - $ref: '#/components/messages/imMarked' - - $ref: '#/components/messages/imOpen' - - $ref: '#/components/messages/manualPresenceChange' - - $ref: '#/components/messages/memberJoinedChannel' - - $ref: '#/components/messages/message' - + subscribe.message.0: + $ref: '#/components/messages/hello' + subscribe.message.1: + $ref: '#/components/messages/connectionError' + subscribe.message.2: + $ref: '#/components/messages/accountsChanged' + subscribe.message.3: + $ref: '#/components/messages/botAdded' + subscribe.message.4: + $ref: '#/components/messages/botChanged' + subscribe.message.5: + $ref: '#/components/messages/channelArchive' + subscribe.message.6: + $ref: '#/components/messages/channelCreated' + subscribe.message.7: + $ref: '#/components/messages/channelDeleted' + subscribe.message.8: + $ref: '#/components/messages/channelHistoryChanged' + subscribe.message.9: + $ref: '#/components/messages/channelJoined' + subscribe.message.10: + $ref: '#/components/messages/channelLeft' + subscribe.message.11: + $ref: '#/components/messages/channelMarked' + subscribe.message.12: + $ref: '#/components/messages/channelRename' + subscribe.message.13: + $ref: '#/components/messages/channelUnarchive' + subscribe.message.14: + $ref: '#/components/messages/commandsChanged' + subscribe.message.15: + $ref: '#/components/messages/dndUpdated' + subscribe.message.16: + $ref: '#/components/messages/dndUpdatedUser' + subscribe.message.17: + $ref: '#/components/messages/emailDomainChanged' + subscribe.message.18: + $ref: '#/components/messages/emojiRemoved' + subscribe.message.19: + $ref: '#/components/messages/emojiAdded' + subscribe.message.20: + $ref: '#/components/messages/fileChange' + subscribe.message.21: + $ref: '#/components/messages/fileCommentAdded' + subscribe.message.22: + $ref: '#/components/messages/fileCommentDeleted' + subscribe.message.23: + $ref: '#/components/messages/fileCommentEdited' + subscribe.message.24: + $ref: '#/components/messages/fileCreated' + subscribe.message.25: + $ref: '#/components/messages/fileDeleted' + subscribe.message.26: + $ref: '#/components/messages/filePublic' + subscribe.message.27: + $ref: '#/components/messages/fileShared' + subscribe.message.28: + $ref: '#/components/messages/fileUnshared' + subscribe.message.29: + $ref: '#/components/messages/goodbye' + subscribe.message.30: + $ref: '#/components/messages/groupArchive' + subscribe.message.31: + $ref: '#/components/messages/groupClose' + subscribe.message.32: + $ref: '#/components/messages/groupHistoryChanged' + subscribe.message.33: + $ref: '#/components/messages/groupJoined' + subscribe.message.34: + $ref: '#/components/messages/groupLeft' + subscribe.message.35: + $ref: '#/components/messages/groupMarked' + subscribe.message.36: + $ref: '#/components/messages/groupOpen' + subscribe.message.37: + $ref: '#/components/messages/groupRename' + subscribe.message.38: + $ref: '#/components/messages/groupUnarchive' + subscribe.message.39: + $ref: '#/components/messages/imClose' + subscribe.message.40: + $ref: '#/components/messages/imCreated' + subscribe.message.41: + $ref: '#/components/messages/imMarked' + subscribe.message.42: + $ref: '#/components/messages/imOpen' + subscribe.message.43: + $ref: '#/components/messages/manualPresenceChange' + subscribe.message.44: + $ref: '#/components/messages/memberJoinedChannel' + subscribe.message.45: + $ref: '#/components/messages/message' +operations: + /.publish: + action: receive + channel: + $ref: '#/channels/~1' + messages: + - $ref: '#/components/messages/outgoingMessage' + /.subscribe: + action: send + channel: + $ref: '#/channels/~1' + messages: + - $ref: '#/components/messages/hello' + - $ref: '#/components/messages/connectionError' + - $ref: '#/components/messages/accountsChanged' + - $ref: '#/components/messages/botAdded' + - $ref: '#/components/messages/botChanged' + - $ref: '#/components/messages/channelArchive' + - $ref: '#/components/messages/channelCreated' + - $ref: '#/components/messages/channelDeleted' + - $ref: '#/components/messages/channelHistoryChanged' + - $ref: '#/components/messages/channelJoined' + - $ref: '#/components/messages/channelLeft' + - $ref: '#/components/messages/channelMarked' + - $ref: '#/components/messages/channelRename' + - $ref: '#/components/messages/channelUnarchive' + - $ref: '#/components/messages/commandsChanged' + - $ref: '#/components/messages/dndUpdated' + - $ref: '#/components/messages/dndUpdatedUser' + - $ref: '#/components/messages/emailDomainChanged' + - $ref: '#/components/messages/emojiRemoved' + - $ref: '#/components/messages/emojiAdded' + - $ref: '#/components/messages/fileChange' + - $ref: '#/components/messages/fileCommentAdded' + - $ref: '#/components/messages/fileCommentDeleted' + - $ref: '#/components/messages/fileCommentEdited' + - $ref: '#/components/messages/fileCreated' + - $ref: '#/components/messages/fileDeleted' + - $ref: '#/components/messages/filePublic' + - $ref: '#/components/messages/fileShared' + - $ref: '#/components/messages/fileUnshared' + - $ref: '#/components/messages/goodbye' + - $ref: '#/components/messages/groupArchive' + - $ref: '#/components/messages/groupClose' + - $ref: '#/components/messages/groupHistoryChanged' + - $ref: '#/components/messages/groupJoined' + - $ref: '#/components/messages/groupLeft' + - $ref: '#/components/messages/groupMarked' + - $ref: '#/components/messages/groupOpen' + - $ref: '#/components/messages/groupRename' + - $ref: '#/components/messages/groupUnarchive' + - $ref: '#/components/messages/imClose' + - $ref: '#/components/messages/imCreated' + - $ref: '#/components/messages/imMarked' + - $ref: '#/components/messages/imOpen' + - $ref: '#/components/messages/manualPresenceChange' + - $ref: '#/components/messages/memberJoinedChannel' + - $ref: '#/components/messages/message' components: securitySchemes: token: type: httpApiKey name: token in: query - schemas: attachment: type: object @@ -123,10 +222,9 @@ components: format: uri ts: type: number - messages: hello: - summary: 'First event received upon connection.' + summary: First event received upon connection. payload: type: object properties: @@ -135,7 +233,7 @@ components: enum: - hello connectionError: - summary: 'Event received when a connection error happens.' + summary: Event received when a connection error happens. payload: type: object properties: @@ -151,7 +249,7 @@ components: msg: type: string accountsChanged: - summary: 'The list of accounts a user is signed into has changed.' + summary: The list of accounts a user is signed into has changed. payload: type: object properties: @@ -160,7 +258,7 @@ components: enum: - accounts_changed botAdded: - summary: 'A bot user was added.' + summary: A bot user was added. payload: type: object properties: @@ -182,7 +280,7 @@ components: additionalProperties: type: string botChanged: - summary: 'A bot user was changed.' + summary: A bot user was changed. payload: type: object properties: @@ -204,7 +302,7 @@ components: additionalProperties: type: string channelArchive: - summary: 'A channel was archived.' + summary: A channel was archived. payload: type: object properties: @@ -217,7 +315,7 @@ components: user: type: string channelCreated: - summary: 'A channel was created.' + summary: A channel was created. payload: type: object properties: @@ -237,7 +335,7 @@ components: creator: type: string channelDeleted: - summary: 'A channel was deleted.' + summary: A channel was deleted. payload: type: object properties: @@ -248,7 +346,7 @@ components: channel: type: string channelHistoryChanged: - summary: 'Bulk updates were made to a channel''s history.' + summary: Bulk updates were made to a channel's history. payload: type: object properties: @@ -263,7 +361,7 @@ components: event_ts: type: string channelJoined: - summary: 'You joined a channel.' + summary: You joined a channel. payload: type: object properties: @@ -283,7 +381,7 @@ components: creator: type: string channelLeft: - summary: 'You left a channel.' + summary: You left a channel. payload: type: object properties: @@ -294,7 +392,7 @@ components: channel: type: string channelMarked: - summary: 'Your channel read marker was updated.' + summary: Your channel read marker was updated. payload: type: object properties: @@ -307,7 +405,7 @@ components: ts: type: string channelRename: - summary: 'A channel was renamed.' + summary: A channel was renamed. payload: type: object properties: @@ -325,7 +423,7 @@ components: created: type: number channelUnarchive: - summary: 'A channel was unarchived.' + summary: A channel was unarchived. payload: type: object properties: @@ -338,7 +436,7 @@ components: user: type: string commandsChanged: - summary: 'A slash command has been added or changed.' + summary: A slash command has been added or changed. payload: type: object properties: @@ -349,7 +447,7 @@ components: event_ts: type: string dndUpdated: - summary: 'Do not Disturb settings changed for the current user.' + summary: Do not Disturb settings changed for the current user. payload: type: object properties: @@ -373,7 +471,7 @@ components: snooze_endtime: type: number dndUpdatedUser: - summary: 'Do not Disturb settings changed for a member.' + summary: Do not Disturb settings changed for a member. payload: type: object properties: @@ -393,7 +491,7 @@ components: next_dnd_end_ts: type: number emailDomainChanged: - summary: 'The workspace email domain has changed.' + summary: The workspace email domain has changed. payload: type: object properties: @@ -406,7 +504,7 @@ components: event_ts: type: string emojiRemoved: - summary: 'A custom emoji has been removed.' + summary: A custom emoji has been removed. payload: type: object properties: @@ -425,7 +523,7 @@ components: event_ts: type: string emojiAdded: - summary: 'A custom emoji has been added.' + summary: A custom emoji has been added. payload: type: object properties: @@ -445,7 +543,7 @@ components: event_ts: type: string fileChange: - summary: 'A file was changed.' + summary: A file was changed. payload: type: object properties: @@ -461,7 +559,7 @@ components: id: type: string fileCommentAdded: - summary: 'A file comment was added.' + summary: A file comment was added. payload: type: object properties: @@ -478,7 +576,7 @@ components: id: type: string fileCommentDeleted: - summary: 'A file comment was deleted.' + summary: A file comment was deleted. payload: type: object properties: @@ -496,7 +594,7 @@ components: id: type: string fileCommentEdited: - summary: 'A file comment was edited.' + summary: A file comment was edited. payload: type: object properties: @@ -513,7 +611,7 @@ components: id: type: string fileCreated: - summary: 'A file was created.' + summary: A file was created. payload: type: object properties: @@ -529,7 +627,7 @@ components: id: type: string fileDeleted: - summary: 'A file was deleted.' + summary: A file was deleted. payload: type: object properties: @@ -542,7 +640,7 @@ components: event_ts: type: string filePublic: - summary: 'A file was made public.' + summary: A file was made public. payload: type: object properties: @@ -558,7 +656,7 @@ components: id: type: string fileShared: - summary: 'A file was shared.' + summary: A file was shared. payload: type: object properties: @@ -574,7 +672,7 @@ components: id: type: string fileUnshared: - summary: 'A file was unshared.' + summary: A file was unshared. payload: type: object properties: @@ -590,7 +688,7 @@ components: id: type: string goodbye: - summary: 'The server intends to close the connection soon.' + summary: The server intends to close the connection soon. payload: type: object properties: @@ -599,7 +697,7 @@ components: enum: - goodbye groupArchive: - summary: 'A private channel was archived.' + summary: A private channel was archived. payload: type: object properties: @@ -610,7 +708,7 @@ components: channel: type: string groupClose: - summary: 'You closed a private channel.' + summary: You closed a private channel. payload: type: object properties: @@ -623,7 +721,7 @@ components: channel: type: string groupHistoryChanged: - summary: 'Bulk updates were made to a private channel''s history.' + summary: Bulk updates were made to a private channel's history. payload: type: object properties: @@ -638,7 +736,7 @@ components: event_ts: type: string groupJoined: - summary: 'You joined a private channel.' + summary: You joined a private channel. payload: type: object properties: @@ -658,7 +756,7 @@ components: creator: type: string groupLeft: - summary: 'You left a private channel.' + summary: You left a private channel. payload: type: object properties: @@ -669,7 +767,7 @@ components: channel: type: string groupMarked: - summary: 'A private channel read marker was updated.' + summary: A private channel read marker was updated. payload: type: object properties: @@ -682,7 +780,7 @@ components: ts: type: string groupOpen: - summary: 'You opened a private channel.' + summary: You opened a private channel. payload: type: object properties: @@ -695,7 +793,7 @@ components: channel: type: string groupRename: - summary: 'A private channel was renamed.' + summary: A private channel was renamed. payload: type: object properties: @@ -713,7 +811,7 @@ components: created: type: number groupUnarchive: - summary: 'A private channel was unarchived.' + summary: A private channel was unarchived. payload: type: object properties: @@ -726,7 +824,7 @@ components: user: type: string imClose: - summary: 'You closed a DM.' + summary: You closed a DM. payload: type: object properties: @@ -739,7 +837,7 @@ components: user: type: string imCreated: - summary: 'A DM was created.' + summary: A DM was created. payload: type: object properties: @@ -761,7 +859,7 @@ components: user: type: string imMarked: - summary: 'A direct message read marker was updated.' + summary: A direct message read marker was updated. payload: type: object properties: @@ -774,7 +872,7 @@ components: ts: type: string imOpen: - summary: 'You opened a DM.' + summary: You opened a DM. payload: type: object properties: @@ -787,7 +885,7 @@ components: user: type: string manualPresenceChange: - summary: 'You manually updated your presence.' + summary: You manually updated your presence. payload: type: object properties: @@ -798,7 +896,7 @@ components: presence: type: string memberJoinedChannel: - summary: 'A user joined a public or private channel.' + summary: A user joined a public or private channel. payload: type: object properties: @@ -820,7 +918,7 @@ components: inviter: type: string memberLeftChannel: - summary: 'A user left a public or private channel.' + summary: A user left a public or private channel. payload: type: object properties: @@ -840,7 +938,7 @@ components: team: type: string message: - summary: 'A message was sent to a channel.' + summary: A message was sent to a channel. payload: type: object properties: @@ -868,7 +966,7 @@ components: ts: type: string outgoingMessage: - summary: 'A message was sent to a channel.' + summary: A message was sent to a channel. payload: type: object properties: @@ -881,4 +979,4 @@ components: channel: type: string text: - type: string \ No newline at end of file + type: string diff --git a/examples/streetlights-kafka.yml b/examples/streetlights-kafka.yml index 916111154..79fed621f 100644 --- a/examples/streetlights-kafka.yml +++ b/examples/streetlights-kafka.yml @@ -1,107 +1,127 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Streetlights Kafka API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you to remotely manage the city lights. - - ### Check out its awesome features: - - * Turn a specific streetlight on/off 🌃 - * Dim a specific streetlight 😎 - * Receive real-time information about environmental lighting conditions 📈 + version: 1.0.0 + description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n" license: name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - + url: 'https://www.apache.org/licenses/LICENSE-2.0' +defaultContentType: application/json servers: scram-connections: - url: test.mykafkacluster.org:18092 + host: 'test.mykafkacluster.org:18092' protocol: kafka-secure description: Test broker secured with scramSha256 security: - - saslScram: [] + - $ref: '#/components/securitySchemes/saslScram' tags: - - name: "env:test-scram" - description: "This environment is meant for running internal tests through scramSha256" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:private" - description: "This resource is private and only available to certain users" + - name: 'env:test-scram' + description: >- + This environment is meant for running internal tests through + scramSha256 + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:private' + description: This resource is private and only available to certain users mtls-connections: - url: test.mykafkacluster.org:28092 + host: 'test.mykafkacluster.org:28092' protocol: kafka-secure description: Test broker secured with X509 security: - - certs: [] + - $ref: '#/components/securitySchemes/certs' tags: - - name: "env:test-mtls" - description: "This environment is meant for running internal tests through mtls" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:private" - description: "This resource is private and only available to certain users" - -defaultContentType: application/json - + - name: 'env:test-mtls' + description: This environment is meant for running internal tests through mtls + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:private' + description: This resource is private and only available to certain users channels: - smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured: + 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured': + address: 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured' + messages: + receiveLightMeasurement.message: + $ref: '#/components/messages/lightMeasured' description: The topic on which measured values may be produced and consumed. parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - publish: - summary: Inform about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/lightMeasured' - - smartylighting.streetlights.1.0.action.{streetlightId}.turn.on: + 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on' + messages: + turnOn.message: + $ref: '#/components/messages/turnOnOff' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOn - traits: - - $ref: '#/components/operationTraits/kafka' - message: + 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off' + messages: + turnOff.message: $ref: '#/components/messages/turnOnOff' - - smartylighting.streetlights.1.0.action.{streetlightId}.turn.off: parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOff - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/turnOnOff' - - smartylighting.streetlights.1.0.action.{streetlightId}.dim: + 'smartylighting.streetlights.1.0.action.{streetlightId}.dim': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.dim' + messages: + dimLight.message: + $ref: '#/components/messages/dimLight' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: dimLight - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/dimLight' - +operations: + receiveLightMeasurement: + action: receive + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/lightMeasured' + turnOn: + action: send + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.action.{streetlightId}.turn.on + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/turnOnOff' + turnOff: + action: send + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.action.{streetlightId}.turn.off + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/turnOnOff' + dimLight: + action: send + channel: + $ref: '#/channels/smartylighting.streetlights.1.0.action.{streetlightId}.dim' + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/dimLight' components: messages: lightMeasured: name: lightMeasured title: Light measured - summary: Inform about environmental lighting conditions of a particular streetlight. + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. contentType: application/json traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/lightMeasuredPayload" + $ref: '#/components/schemas/lightMeasuredPayload' turnOnOff: name: turnOnOff title: Turn on/off @@ -109,7 +129,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/turnOnOffPayload" + $ref: '#/components/schemas/turnOnOffPayload' dimLight: name: dimLight title: Dim light @@ -117,8 +137,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/dimLightPayload" - + $ref: '#/components/schemas/dimLightPayload' schemas: lightMeasuredPayload: type: object @@ -128,18 +147,18 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' turnOnOffPayload: type: object properties: command: type: string enum: - - on - - off + - 'on' + - 'off' description: Whether to turn on or off the light. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' dimLightPayload: type: object properties: @@ -149,12 +168,11 @@ components: minimum: 0 maximum: 100 sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' sentAt: type: string format: date-time description: Date and time when the message was sent. - securitySchemes: saslScram: type: scramSha256 @@ -162,13 +180,11 @@ components: certs: type: X509 description: Download the certificate files from service provider - parameters: streetlightId: description: The ID of the streetlight. schema: type: string - messageTraits: commonHeaders: headers: @@ -178,11 +194,11 @@ components: type: integer minimum: 0 maximum: 100 - operationTraits: kafka: bindings: kafka: clientId: type: string - enum: ['my-app-id'] + enum: + - my-app-id diff --git a/examples/streetlights-mqtt.yml b/examples/streetlights-mqtt.yml index b3721d878..27536c4cd 100644 --- a/examples/streetlights-mqtt.yml +++ b/examples/streetlights-mqtt.yml @@ -1,22 +1,15 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Streetlights MQTT API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you to remotely manage the city lights. - - ### Check out its awesome features: - - * Turn a specific streetlight on/off 🌃 - * Dim a specific streetlight 😎 - * Receive real-time information about environmental lighting conditions 📈 + version: 1.0.0 + description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n" license: name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - + url: 'https://www.apache.org/licenses/LICENSE-2.0' +defaultContentType: application/json servers: production: - url: test.mosquitto.org:{port} + host: 'test.mosquitto.org:{port}' protocol: mqtt description: Test broker variables: @@ -27,80 +20,135 @@ servers: - '1883' - '8883' security: - - apiKey: [] - - supportedOauthFlows: - - streetlights:on - - streetlights:off - - streetlights:dim - - openIdConnectWellKnown: [] + - $ref: '#/components/securitySchemes/apiKey' + - type: oauth2 + description: Flows to support OAuth 2.0 + flows: + implicit: + authorizationUrl: 'https://authserver.example/auth' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + password: + tokenUrl: 'https://authserver.example/token' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + clientCredentials: + tokenUrl: 'https://authserver.example/token' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + authorizationCode: + authorizationUrl: 'https://authserver.example/auth' + tokenUrl: 'https://authserver.example/token' + refreshUrl: 'https://authserver.example/refresh' + availableScopes: + 'streetlights:on': Ability to switch lights on + 'streetlights:off': Ability to switch lights off + 'streetlights:dim': Ability to dim the lights + scopes: + - 'streetlights:on' + - 'streetlights:off' + - 'streetlights:dim' + - $ref: '#/components/securitySchemes/openIdConnectWellKnown' tags: - - name: "env:production" - description: "This environment is meant for production use case" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:public" - description: "This resource is public and available to everyone" - -defaultContentType: application/json - + - name: 'env:production' + description: This environment is meant for production use case + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:public' + description: This resource is public and available to everyone channels: - smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured: + 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured': + address: 'smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured' + messages: + receiveLightMeasurement.message: + $ref: '#/components/messages/lightMeasured' description: The topic on which measured values may be produced and consumed. parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - publish: - summary: Inform about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - traits: - - $ref: '#/components/operationTraits/mqtt' - message: - $ref: '#/components/messages/lightMeasured' - - smartylighting/streetlights/1/0/action/{streetlightId}/turn/on: + 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on': + address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/on' + messages: + turnOn.message: + $ref: '#/components/messages/turnOnOff' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOn - traits: - - $ref: '#/components/operationTraits/mqtt' - message: + 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off': + address: 'smartylighting/streetlights/1/0/action/{streetlightId}/turn/off' + messages: + turnOff.message: $ref: '#/components/messages/turnOnOff' - - smartylighting/streetlights/1/0/action/{streetlightId}/turn/off: parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOff - traits: - - $ref: '#/components/operationTraits/mqtt' - message: - $ref: '#/components/messages/turnOnOff' - - smartylighting/streetlights/1/0/action/{streetlightId}/dim: + 'smartylighting/streetlights/1/0/action/{streetlightId}/dim': + address: 'smartylighting/streetlights/1/0/action/{streetlightId}/dim' + messages: + dimLight.message: + $ref: '#/components/messages/dimLight' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: dimLight - traits: - - $ref: '#/components/operationTraits/mqtt' - message: - $ref: '#/components/messages/dimLight' - +operations: + receiveLightMeasurement: + action: receive + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1event~1{streetlightId}~1lighting~1measured + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. + traits: + - $ref: '#/components/operationTraits/mqtt' + messages: + - $ref: '#/components/messages/lightMeasured' + turnOn: + action: send + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1on + traits: + - $ref: '#/components/operationTraits/mqtt' + messages: + - $ref: '#/components/messages/turnOnOff' + turnOff: + action: send + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1turn~1off + traits: + - $ref: '#/components/operationTraits/mqtt' + messages: + - $ref: '#/components/messages/turnOnOff' + dimLight: + action: send + channel: + $ref: >- + #/channels/smartylighting~1streetlights~11~10~1action~1{streetlightId}~1dim + traits: + - $ref: '#/components/operationTraits/mqtt' + messages: + - $ref: '#/components/messages/dimLight' components: messages: lightMeasured: name: lightMeasured title: Light measured - summary: Inform about environmental lighting conditions of a particular streetlight. + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. contentType: application/json traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/lightMeasuredPayload" + $ref: '#/components/schemas/lightMeasuredPayload' turnOnOff: name: turnOnOff title: Turn on/off @@ -108,7 +156,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/turnOnOffPayload" + $ref: '#/components/schemas/turnOnOffPayload' dimLight: name: dimLight title: Dim light @@ -116,8 +164,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/dimLightPayload" - + $ref: '#/components/schemas/dimLightPayload' schemas: lightMeasuredPayload: type: object @@ -127,18 +174,18 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' turnOnOffPayload: type: object properties: command: type: string enum: - - on - - off + - 'on' + - 'off' description: Whether to turn on or off the light. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' dimLightPayload: type: object properties: @@ -148,12 +195,11 @@ components: minimum: 0 maximum: 100 sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' sentAt: type: string format: date-time description: Date and time when the message was sent. - securitySchemes: apiKey: type: apiKey @@ -165,19 +211,19 @@ components: flows: implicit: authorizationUrl: 'https://authserver.example/auth' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights password: tokenUrl: 'https://authserver.example/token' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights clientCredentials: tokenUrl: 'https://authserver.example/token' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights @@ -185,20 +231,18 @@ components: authorizationUrl: 'https://authserver.example/auth' tokenUrl: 'https://authserver.example/token' refreshUrl: 'https://authserver.example/refresh' - scopes: + availableScopes: 'streetlights:on': Ability to switch lights on 'streetlights:off': Ability to switch lights off 'streetlights:dim': Ability to dim the lights openIdConnectWellKnown: type: openIdConnect openIdConnectUrl: 'https://authserver.example/.well-known' - parameters: streetlightId: description: The ID of the streetlight. schema: type: string - messageTraits: commonHeaders: headers: @@ -208,7 +252,6 @@ components: type: integer minimum: 0 maximum: 100 - operationTraits: mqtt: bindings: diff --git a/examples/streetlights-operation-security.yml b/examples/streetlights-operation-security.yml index faf122763..ec025e418 100644 --- a/examples/streetlights-operation-security.yml +++ b/examples/streetlights-operation-security.yml @@ -1,125 +1,162 @@ -asyncapi: '2.5.0' +asyncapi: 3.0.0 info: title: Streetlights Kafka API - version: '1.0.0' - description: | - The Smartylighting Streetlights API allows you to remotely manage the city lights. - - ### Check out its awesome features: - - * Turn a specific streetlight on/off 🌃 - * Dim a specific streetlight 😎 - * Receive real-time information about environmental lighting conditions 📈 + version: 1.0.0 + description: "The Smartylighting Streetlights API allows you to remotely manage the city lights.\n\n### Check out its awesome features:\n\n* Turn a specific streetlight on/off \U0001F303\n* Dim a specific streetlight \U0001F60E\n* Receive real-time information about environmental lighting conditions \U0001F4C8\n" license: name: Apache 2.0 - url: https://www.apache.org/licenses/LICENSE-2.0 - + url: 'https://www.apache.org/licenses/LICENSE-2.0' +defaultContentType: application/json servers: test: - url: test.mykafkacluster.org:8092 + host: 'test.mykafkacluster.org:8092' protocol: kafka-secure description: Test broker security: - - saslScram: [] + - $ref: '#/components/securitySchemes/saslScram' test_oauth: - url: test.mykafkacluster.org:8093 + host: 'test.mykafkacluster.org:8093' protocol: kafka-secure - description: Test port for oauth + description: Test port for oauth security: - - streetlights_auth: - - streetlights:write - - streetlights:read - - -defaultContentType: application/json - + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'streetlights:read': Scope required for subscribing to channel + 'streetlights:write': Scope required for publishing to channel + scopes: + - 'streetlights:write' + - 'streetlights:read' channels: - smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured: + 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured': + address: 'smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured' + messages: + receiveLightMeasurement.message: + $ref: '#/components/messages/lightMeasured' description: The topic on which measured values may be produced and consumed. servers: - - test + - $ref: '#/servers/test' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - publish: - summary: Inform about environmental lighting conditions of a particular streetlight. - operationId: receiveLightMeasurement - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/lightMeasured' - - smartylighting.streetlights.1.0.action.{streetlightId}.turn.on: + 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.on' + messages: + turnOn.message: + $ref: '#/components/messages/turnOnOff' servers: - - test_oauth + - $ref: '#/servers/test_oauth' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOn - traits: - - $ref: '#/components/operationTraits/kafka' - message: + 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.turn.off' + messages: + turnOff.message: $ref: '#/components/messages/turnOnOff' - security: - # This operation level security implies the ability to subscribe to messages from - # `smartylighting.streetlights.1.0.action.{streetlightId}.turn.on` channel with Authorization headers - # that have `streetlights:read` scope. Note that an operation level security must still satisfy - # security requirements specified at the server level. - - streetlights_auth: - - streetlights:read - - smartylighting.streetlights.1.0.action.{streetlightId}.turn.off: servers: - - test_oauth + - $ref: '#/servers/test_oauth' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: turnOff - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/turnOnOff' - security: - # This operation level security implies the ability to subscribe to messages from - # `smartylighting.streetlights.1.0.action.{streetlightId}.turn.off` channel with Authorization headers - # that have `streetlights:read` scope. Note that an operation level security must still satisfy - # security options specified at the server level. - - streetlights_auth: - - streetlights:read - smartylighting.streetlights.1.0.action.{streetlightId}.dim: + 'smartylighting.streetlights.1.0.action.{streetlightId}.dim': + address: 'smartylighting.streetlights.1.0.action.{streetlightId}.dim' + messages: + dimLight.message: + $ref: '#/components/messages/dimLight' servers: - - test_oauth + - $ref: '#/servers/test_oauth' parameters: streetlightId: $ref: '#/components/parameters/streetlightId' - subscribe: - operationId: dimLight - traits: - - $ref: '#/components/operationTraits/kafka' - message: - $ref: '#/components/messages/dimLight' - security: - # This operation level security implies the ability to subscribe to messages from - # `smartylighting.streetlights.1.0.action.{streetlightId}.dim` channel with Authorization headers - # that have `streetlights:read` scope. Note that an operation level security must still satisfy - # security options specified at the server level. - - streetlights_auth: - - streetlights:read - - +operations: + receiveLightMeasurement: + action: receive + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.event.{streetlightId}.lighting.measured + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/lightMeasured' + turnOn: + action: send + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.action.{streetlightId}.turn.on + security: + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'streetlights:read': Scope required for subscribing to channel + 'streetlights:write': Scope required for publishing to channel + scopes: + - 'streetlights:read' + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/turnOnOff' + turnOff: + action: send + channel: + $ref: >- + #/channels/smartylighting.streetlights.1.0.action.{streetlightId}.turn.off + security: + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'streetlights:read': Scope required for subscribing to channel + 'streetlights:write': Scope required for publishing to channel + scopes: + - 'streetlights:read' + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/turnOnOff' + dimLight: + action: send + channel: + $ref: '#/channels/smartylighting.streetlights.1.0.action.{streetlightId}.dim' + security: + - type: oauth2 + description: The oauth security descriptions + flows: + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'streetlights:read': Scope required for subscribing to channel + 'streetlights:write': Scope required for publishing to channel + scopes: + - 'streetlights:read' + traits: + - $ref: '#/components/operationTraits/kafka' + messages: + - $ref: '#/components/messages/dimLight' components: messages: lightMeasured: name: lightMeasured title: Light measured - summary: Inform about environmental lighting conditions of a particular streetlight. + summary: >- + Inform about environmental lighting conditions of a particular + streetlight. contentType: application/json traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/lightMeasuredPayload" + $ref: '#/components/schemas/lightMeasuredPayload' turnOnOff: name: turnOnOff title: Turn on/off @@ -127,7 +164,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/turnOnOffPayload" + $ref: '#/components/schemas/turnOnOffPayload' dimLight: name: dimLight title: Dim light @@ -135,8 +172,7 @@ components: traits: - $ref: '#/components/messageTraits/commonHeaders' payload: - $ref: "#/components/schemas/dimLightPayload" - + $ref: '#/components/schemas/dimLightPayload' schemas: lightMeasuredPayload: type: object @@ -146,18 +182,18 @@ components: minimum: 0 description: Light intensity measured in lumens. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' turnOnOffPayload: type: object properties: command: type: string enum: - - on - - off + - 'on' + - 'off' description: Whether to turn on or off the light. sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' dimLightPayload: type: object properties: @@ -167,12 +203,11 @@ components: minimum: 0 maximum: 100 sentAt: - $ref: "#/components/schemas/sentAt" + $ref: '#/components/schemas/sentAt' sentAt: type: string format: date-time description: Date and time when the message was sent. - securitySchemes: saslScram: type: scramSha256 @@ -181,18 +216,16 @@ components: type: oauth2 description: The oauth security descriptions flows: - clientCredentials: - tokenUrl: 'https://example.com/api/oauth/dialog' - scopes: - streetlights:read: Scope required for subscribing to channel - streetlights:write: Scope required for publishing to channel - + clientCredentials: + tokenUrl: 'https://example.com/api/oauth/dialog' + availableScopes: + 'streetlights:read': Scope required for subscribing to channel + 'streetlights:write': Scope required for publishing to channel parameters: streetlightId: description: The ID of the streetlight. schema: type: string - messageTraits: commonHeaders: headers: @@ -202,11 +235,11 @@ components: type: integer minimum: 0 maximum: 100 - operationTraits: kafka: bindings: kafka: clientId: type: string - enum: ['my-app-id'] + enum: + - my-app-id diff --git a/examples/websocket-gemini.yml b/examples/websocket-gemini.yml index 75af8d4d6..6e6fc7c75 100644 --- a/examples/websocket-gemini.yml +++ b/examples/websocket-gemini.yml @@ -1,83 +1,139 @@ -# -# -# -# This example showcases usage of AsyncAPI for the purpose of describing a WebSocket API. It is based on a real public service maintained by company called Gemini that provides cryptocurency trading products. It uses AsyncAPI bindings. -# -# This AsyncAPI document describes their v1 of the API. The v2 is also available and changes in the way that it provides a multimessage channel, where you subscribe for messages by sending a subscription message instead of using query parameters. For example with multimessage channel check out this article https://www.asyncapi.com/blog/websocket-part2 about another real public API called Kraken -# -# All available learning materials about AsyncAPI and WebSocket are: -# - WebSocket, Shrek, and AsyncAPI - An Opinionated Intro article: https://www.asyncapi.com/blog/websocket-part1 -# - Creating AsyncAPI for WebSocket API - Step by Step article: https://www.asyncapi.com/blog/websocket-part2 -# - From API-First to Code Generation - A WebSocket Use Case article: https://www.asyncapi.com/blog/websocket-part3 -# - Live stream about topics mentioned in part 1 and 2 articles: https://www.youtube.com/watch?v=8tFBcf31e_c -# - -asyncapi: '2.5.0' - -# -# Overal information for users of the application -# +asyncapi: 3.0.0 info: title: Gemini Market Data Websocket API - version: '1.0.0' - contact: - name: Gemini - url: https://www.gemini.com/ - description: | - Market data is a public API that streams all the market data on a given symbol. - - You can quickly play with the API using [websocat](https://github.com/vi/websocat#installation) like this: + version: 1.0.0 + description: > + Market data is a public API that streams all the market data on a given + symbol. + + + You can quickly play with the API using + [websocat](https://github.com/vi/websocat#installation) like this: + ```bash + websocat wss://api.gemini.com/v1/marketdata/btcusd?heartbeat=true -S + ``` - -# -# Link to external docs -# -externalDocs: - url: https://docs.sandbox.gemini.com/websocket-api/#market-data - -# -# Details on how to connect to the application -# + contact: + name: Gemini + url: 'https://www.gemini.com/' + externalDocs: + url: 'https://docs.sandbox.gemini.com/websocket-api/#market-data' servers: public: - url: wss://api.gemini.com + host: api.gemini.com protocol: wss - -# -# Details about all the channels that you can listen to or send to messages -# channels: - /v1/marketdata/{symbol}: + '/v1/marketdata/{symbol}': + address: '/v1/marketdata/{symbol}' + messages: + subscribe.message: + $ref: '#/components/messages/marketData' parameters: symbol: - description: | - Symbols are formatted as CCY1CCY2 where prices are in CCY2 and quantities are in CCY1. To read more click [here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums). + description: > + Symbols are formatted as CCY1CCY2 where prices are in CCY2 and + quantities are in CCY1. To read more click + [here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums). schema: type: string - enum: ['btcusd', 'ethbtc', 'ethusd', 'zecusd', 'zecbtc', 'zeceth', 'zecbch', 'zecltc', 'bchusd', 'bchbtc', 'bcheth', 'ltcusd', 'ltcbtc', 'ltceth', 'ltcbch', 'batusd', 'daiusd', 'linkusd', 'oxtusd', 'batbtc', 'linkbtc', 'oxtbtc', 'bateth', 'linketh', 'oxteth', 'ampusd', 'compusd', 'paxgusd', 'mkrusd', 'zrxusd', 'kncusd', 'manausd', 'storjusd', 'snxusd', 'crvusd', 'balusd', 'uniusd', 'renusd', 'umausd', 'yfiusd', 'btcdai', 'ethdai', 'aaveusd', 'filusd', 'btceur', 'btcgbp', 'etheur', 'ethgbp', 'btcsgd', 'ethsgd', 'sklusd', 'grtusd', 'bntusd', '1inchusd', 'enjusd', 'lrcusd', 'sandusd', 'cubeusd', 'lptusd', 'bondusd', 'maticusd', 'injusd', 'sushiusd'] + enum: + - btcusd + - ethbtc + - ethusd + - zecusd + - zecbtc + - zeceth + - zecbch + - zecltc + - bchusd + - bchbtc + - bcheth + - ltcusd + - ltcbtc + - ltceth + - ltcbch + - batusd + - daiusd + - linkusd + - oxtusd + - batbtc + - linkbtc + - oxtbtc + - bateth + - linketh + - oxteth + - ampusd + - compusd + - paxgusd + - mkrusd + - zrxusd + - kncusd + - manausd + - storjusd + - snxusd + - crvusd + - balusd + - uniusd + - renusd + - umausd + - yfiusd + - btcdai + - ethdai + - aaveusd + - filusd + - btceur + - btcgbp + - etheur + - ethgbp + - btcsgd + - ethsgd + - sklusd + - grtusd + - bntusd + - 1inchusd + - enjusd + - lrcusd + - sandusd + - cubeusd + - lptusd + - bondusd + - maticusd + - injusd + - sushiusd bindings: ws: bindingVersion: 0.1.0 query: type: object - description: | + description: > The semantics of entry type filtering is: - If any entry type is specified as true or false, all of them must be explicitly flagged true to show up in the response - If no entry types filtering parameters are included in the url, then all entry types will appear in the response - NOTE: top_of_book has no meaning and initial book events are empty when only trades is specified + If any entry type is specified as true or false, all of them must be + explicitly flagged true to show up in the response + + If no entry types filtering parameters are included in the url, then + all entry types will appear in the response + + + NOTE: top_of_book has no meaning and initial book events are empty + when only trades is specified properties: heartbeat: type: boolean default: false - description: Optionally add this parameter and set to true to receive a heartbeat every 5 seconds + description: >- + Optionally add this parameter and set to true to receive a + heartbeat every 5 seconds top_of_book: type: boolean default: false - description: If absent or false, receive full order book depth; if present and true, receive top of book only. Only applies to bids and offers. + description: >- + If absent or false, receive full order book depth; if present + and true, receive top of book only. Only applies to bids and + offers. bids: type: boolean default: true @@ -94,25 +150,29 @@ channels: type: boolean default: true description: Include auction events - subscribe: - summary: Receive market updates on a given symbol - message: - $ref: '#/components/messages/marketData' - -# -# All reusable parts for readability and staying DRY -# +operations: + '/v1/marketdata/{symbol}.subscribe': + action: send + channel: + $ref: '#/channels/~1v1~1marketdata~1{symbol}' + summary: Receive market updates on a given symbol + messages: + - $ref: '#/components/messages/marketData' components: messages: marketData: summary: Message with marked data information. - description: | - The initial response message will show the existing state of the order book. Subsequent messages will show all executed trades, as well as all other changes to the order book from orders placed or canceled. + description: > + The initial response message will show the existing state of the order + book. Subsequent messages will show all executed trades, as well as all + other changes to the order book from orders placed or canceled. payload: $ref: '#/components/schemas/market' examples: - name: updateMessage - summary: Example of an update message that contains a change in price information. + summary: >- + Example of an update message that contains a change in price + information. payload: type: update eventId: 36902233362 @@ -127,7 +187,7 @@ components: delta: '0.002' reason: place - name: heartbeatMessage - summary: Example of additional heartbeat message when you enable them. + summary: Example of additional heartbeat message when you enable them. payload: type: heartbeat socket_sequence: 1656 @@ -154,13 +214,19 @@ components: const: update eventId: type: integer - description: A monotonically increasing sequence number indicating when this change occurred. These numbers are persistent and consistent between market data connections. + description: >- + A monotonically increasing sequence number indicating when this + change occurred. These numbers are persistent and consistent + between market data connections. events: $ref: '#/components/schemas/events' timestamp: type: string format: date-time - description: The timestamp in seconds for this group of events (included for compatibility reasons). We recommend using the timestampms field instead. + description: >- + The timestamp in seconds for this group of events (included for + compatibility reasons). We recommend using the timestampms field + instead. timestampms: type: string format: time @@ -174,40 +240,68 @@ components: - $ref: '#/components/schemas/default' default: type: object - description: This object is always part of the payload. In case of type=heartbeat, these are the only fields. + description: >- + This object is always part of the payload. In case of type=heartbeat, + these are the only fields. required: - - type - - socket_sequence + - type + - socket_sequence properties: socket_sequence: type: integer - description: zero-indexed monotonic increasing sequence number attached to each message sent - if there is a gap in this sequence, you have missed a message. If you choose to enable heartbeats, then heartbeat and update messages will share a single increasing sequence. See [Sequence Numbers](https://docs.sandbox.gemini.com/websocket-api/#sequence-numbers) for more information. + description: >- + zero-indexed monotonic increasing sequence number attached to each + message sent - if there is a gap in this sequence, you have missed a + message. If you choose to enable heartbeats, then heartbeat and + update messages will share a single increasing sequence. See + [Sequence + Numbers](https://docs.sandbox.gemini.com/websocket-api/#sequence-numbers) + for more information. events: type: array - description: Either a change to the order book, or the indication that a trade has occurred. + description: >- + Either a change to the order book, or the indication that a trade has + occurred. items: type: object additionalProperties: false properties: type: type: string - enum: ['trade', 'change', 'auction, block_trade'] + enum: + - trade + - change + - 'auction, block_trade' price: type: number - multipleOf: 1.000 + multipleOf: 1 description: The price of this order book entry. side: type: string - enum: ['bid', 'side'] + enum: + - bid + - side reason: type: string - enum: ['place', 'trade', 'cancel', 'initial'] - description: Indicates why the change has occurred. initial is for the initial response message, which will show the entire existing state of the order book. - remaining: + enum: + - place + - trade + - cancel + - initial + description: >- + Indicates why the change has occurred. initial is for the initial + response message, which will show the entire existing state of the + order book. + remaining: type: number - multipleOf: 1.000 - description: The quantity remaining at that price level after this change occurred. May be zero if all orders at this price level have been filled or canceled. + multipleOf: 1 + description: >- + The quantity remaining at that price level after this change + occurred. May be zero if all orders at this price level have been + filled or canceled. delta: type: number - multipleOf: 1.000 - description: The quantity changed. May be negative, if an order is filled or canceled. For initial messages, delta will equal remaining. \ No newline at end of file + multipleOf: 1 + description: >- + The quantity changed. May be negative, if an order is filled or + canceled. For initial messages, delta will equal remaining. diff --git a/scripts/converter/README.md b/scripts/converter/README.md new file mode 100644 index 000000000..4f5eb5599 --- /dev/null +++ b/scripts/converter/README.md @@ -0,0 +1 @@ +This script converts the official examples to newer versions once released. \ No newline at end of file diff --git a/scripts/converter/index.js b/scripts/converter/index.js new file mode 100644 index 000000000..fec4bc976 --- /dev/null +++ b/scripts/converter/index.js @@ -0,0 +1,34 @@ +const path = require('path'); +const fs = require('fs'); +const { convert } = require('@asyncapi/converter'); +const jsYaml = require('js-yaml'); +const examplesDirectory = path.resolve(__dirname, '../../examples'); +const toVersion = '3.0.0'; + +function convertExample(exampleFile) { + console.warn(`Converting: ${exampleFile}`); + const document = fs.readFileSync(exampleFile, 'utf-8'); + const loadedDocument = jsYaml.load(document); + if(loadedDocument.asyncapi === toVersion) { + console.warn(`${exampleFile} is already version ${toVersion}`); + return; + } + const convertedDocument = convert(document, toVersion, { }); + fs.writeFileSync(exampleFile, convertedDocument); +} + +async function convertExampleDir(directoryPath) { + let examplesFiles = await fs.promises.readdir(directoryPath); + examplesFiles = examplesFiles.map((file) => path.resolve(directoryPath, file)); + const nestedDirectory = examplesFiles.filter((file) => fs.lstatSync(file).isDirectory()); + // only convert .yml files + examplesFiles = examplesFiles.filter((file) => path.extname(file) === '.yml'); + examplesFiles.forEach(convertExample); +} + +/** + * + */ +(async () => { + await convertExampleDir(examplesDirectory); +})() \ No newline at end of file diff --git a/scripts/converter/package-lock.json b/scripts/converter/package-lock.json new file mode 100644 index 000000000..3f07ccc21 --- /dev/null +++ b/scripts/converter/package-lock.json @@ -0,0 +1,1561 @@ +{ + "name": "converter", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "converter", + "dependencies": { + "@asyncapi/converter": "1.2.1", + "js-yaml": "^4.1.0" + } + }, + "node_modules/@asyncapi/converter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@asyncapi/converter/-/converter-1.2.1.tgz", + "integrity": "sha512-n1Us4a5vPd3YbARVABetALTEJHah//qc8g+UeSCcZ9xFfryH8iYr16MNfP0vd/IV4ZWJlBy/LWenZOpTyXs9wQ==", + "dependencies": { + "@asyncapi/parser": "^2.0.0-next-major.11", + "js-yaml": "^3.14.1" + } + }, + "node_modules/@asyncapi/converter/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@asyncapi/converter/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@asyncapi/parser": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@asyncapi/parser/-/parser-2.0.3.tgz", + "integrity": "sha512-2gtIQOaCz8sR70JFREpg6UwgUBboC/26JcAGySkXY/f1ayjcfDoNLi4LsDvmu6G21qLrGN2lI83i8iLG1AzTAw==", + "dependencies": { + "@asyncapi/specs": "^5.1.0", + "@openapi-contrib/openapi-schema-to-json-schema": "~3.2.0", + "@stoplight/json-ref-resolver": "^3.1.5", + "@stoplight/spectral-core": "^1.16.1", + "@stoplight/spectral-functions": "^1.7.2", + "@stoplight/spectral-parsers": "^1.0.2", + "@types/json-schema": "^7.0.11", + "@types/urijs": "^1.19.19", + "ajv": "^8.11.0", + "ajv-errors": "^3.0.0", + "ajv-formats": "^2.1.1", + "avsc": "^5.7.5", + "js-yaml": "^4.1.0", + "jsonpath-plus": "^7.2.0", + "node-fetch": "2.6.7", + "ramldt2jsonschema": "^1.2.3", + "webapi-parser": "^0.5.0" + } + }, + "node_modules/@asyncapi/specs": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@asyncapi/specs/-/specs-5.1.0.tgz", + "integrity": "sha512-yffhETqehkim43luMnPKOwzY0D0YtU4bKpORIXIaid6p5Y5kDLrMGJaEPkNieQp03HMjhjFrnUPtT8kvqe0+aQ==", + "dependencies": { + "@types/json-schema": "^7.0.11" + } + }, + "node_modules/@jsep-plugin/regex": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz", + "integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@jsep-plugin/ternary": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@jsep-plugin/ternary/-/ternary-1.1.3.tgz", + "integrity": "sha512-qtLGzCNzPVJ3kdH6/zoLWDPjauHIKiLSBAR71Wa0+PWvGA8wODUQvRgxtpUA5YqAYL3CQ8S4qXhd/9WuWTZirg==", + "engines": { + "node": ">= 10.16.0" + }, + "peerDependencies": { + "jsep": "^0.4.0||^1.0.0" + } + }, + "node_modules/@openapi-contrib/openapi-schema-to-json-schema": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@openapi-contrib/openapi-schema-to-json-schema/-/openapi-schema-to-json-schema-3.2.0.tgz", + "integrity": "sha512-Gj6C0JwCr8arj0sYuslWXUBSP/KnUlEGnPW4qxlXvAl543oaNQgMgIgkQUA6vs5BCCvwTEiL8m/wdWzfl4UvSw==", + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, + "node_modules/@stoplight/better-ajv-errors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/better-ajv-errors/-/better-ajv-errors-1.0.3.tgz", + "integrity": "sha512-0p9uXkuB22qGdNfy3VeEhxkU5uwvp/KrBTAbrLBURv6ilxIVwanKwjMc41lQfIVgPGcOkmLbTolfFrSsueu7zA==", + "dependencies": { + "jsonpointer": "^5.0.0", + "leven": "^3.1.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + }, + "peerDependencies": { + "ajv": ">=8" + } + }, + "node_modules/@stoplight/json": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.0.tgz", + "integrity": "sha512-5O0apqJ/t4sIevXCO3SBN9AHCEKKR/Zb4gaj7wYe5863jme9g02Q0n/GhM7ZCALkL+vGPTe4ZzTETP8TFtsw3g==", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-ref-readers": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@stoplight/json-ref-readers/-/json-ref-readers-1.2.2.tgz", + "integrity": "sha512-nty0tHUq2f1IKuFYsLM4CXLZGHdMn+X/IwEUIpeSOXt0QjMUbL0Em57iJUDzz+2MkWG83smIigNZ3fauGjqgdQ==", + "dependencies": { + "node-fetch": "^2.6.0", + "tslib": "^1.14.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/json-ref-readers/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@stoplight/json-ref-resolver": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.5.tgz", + "integrity": "sha512-uaKLITor7UF+JBtI84zs3aOWM0L79zp7w9TrBTwPtx5SLbaQQ4HadDKgX5yhFOLMApLdhwhiftF4c0GFanOxGg==", + "dependencies": { + "@stoplight/json": "^3.17.0", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^12.3.0 || ^13.0.0", + "@types/urijs": "^1.19.19", + "dependency-graph": "~0.11.0", + "fast-memoize": "^2.5.2", + "immer": "^9.0.6", + "lodash": "^4.17.21", + "tslib": "^2.3.1", + "urijs": "^1.19.11" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/ordered-object-literal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.4.tgz", + "integrity": "sha512-OF8uib1jjDs5/cCU+iOVy+GJjU3X7vk/qJIkIJFqwmlJKrrtijFmqwbu8XToXrwTYLQTP+Hebws5gtZEmk9jag==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/path": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/@stoplight/path/-/path-1.3.2.tgz", + "integrity": "sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/spectral-core": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.0.tgz", + "integrity": "sha512-0aj+IELHvhjoPWoOFj41EJilPbaexUuWFg7GCsiJ3BXrniRp3GnPl+TIZkC1ZuuAr/oi77RviDhW9Gm7ndKB9Q==", + "dependencies": { + "@stoplight/better-ajv-errors": "1.0.3", + "@stoplight/json": "~3.20.1", + "@stoplight/path": "1.3.2", + "@stoplight/spectral-parsers": "^1.0.0", + "@stoplight/spectral-ref-resolver": "^1.0.0", + "@stoplight/spectral-runtime": "^1.0.0", + "@stoplight/types": "~13.6.0", + "@types/es-aggregate-error": "^1.0.2", + "@types/json-schema": "^7.0.11", + "ajv": "^8.6.0", + "ajv-errors": "~3.0.0", + "ajv-formats": "~2.1.0", + "es-aggregate-error": "^1.0.7", + "jsonpath-plus": "7.1.0", + "lodash": "~4.17.21", + "lodash.topath": "^4.5.2", + "minimatch": "3.1.2", + "nimma": "0.2.2", + "pony-cause": "^1.0.0", + "simple-eval": "1.0.0", + "tslib": "^2.3.0" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/@stoplight/spectral-core/node_modules/@stoplight/json": { + "version": "3.20.3", + "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.20.3.tgz", + "integrity": "sha512-2m+Km6CkEPWj+H+CXxFyQB9+mVK8ifz9izK0UZpz4G1ZBx2Pd2hI+qw24FJ+X3DTYtMPYIeINTOEaTFWOmbRxQ==", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.6.0.tgz", + "integrity": "sha512-dzyuzvUjv3m1wmhPfq82lCVYGcXG0xUYgqnWfCq3PCVR4BKFhjdkHrnJ+jIDoMKvXb05AZP/ObQF6+NpDo29IQ==", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/spectral-core/node_modules/jsonpath-plus": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.1.0.tgz", + "integrity": "sha512-gTaNRsPWO/K2KY6MrqaUFClF9kmuM6MFH5Dhg1VYDODgFbByw1yb7xu3hrViE/sz+dGOeMWgCzwUwQtAnCTE9g==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@stoplight/spectral-formats": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-formats/-/spectral-formats-1.5.0.tgz", + "integrity": "sha512-VskkdU3qBSvI1dfJ79ysjvTssfNlbA6wrf/XkXK6iTyjfIVqOAWVtjypTb2U95tN/X8IjIBBhNWtZ4tNVZilrA==", + "dependencies": { + "@stoplight/json": "^3.17.0", + "@stoplight/spectral-core": "^1.8.0", + "@types/json-schema": "^7.0.7", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@stoplight/spectral-functions": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-functions/-/spectral-functions-1.7.2.tgz", + "integrity": "sha512-f+61/FtIkQeIo+a269CeaeqjpyRsgDyIk6DGr7iS4hyuk1PPk7Uf6MNRDs9FEIBh7CpdEJ+HSHbMLwgpymWTIw==", + "dependencies": { + "@stoplight/better-ajv-errors": "1.0.3", + "@stoplight/json": "^3.17.1", + "@stoplight/spectral-core": "^1.7.0", + "@stoplight/spectral-formats": "^1.0.0", + "@stoplight/spectral-runtime": "^1.1.0", + "ajv": "^8.6.3", + "ajv-draft-04": "~1.0.0", + "ajv-errors": "~3.0.0", + "ajv-formats": "~2.1.0", + "lodash": "~4.17.21", + "tslib": "^2.3.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@stoplight/spectral-parsers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-parsers/-/spectral-parsers-1.0.2.tgz", + "integrity": "sha512-ZQXknJ+BM5Re4Opj4cgVlHgG2qyOk/wznKJq3Vf1qsBEg2CNzN0pJmSB0deRqW0kArqm44qpb8c+cz3F2rgMtw==", + "dependencies": { + "@stoplight/json": "~3.20.1", + "@stoplight/types": "^13.6.0", + "@stoplight/yaml": "~4.2.3", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@stoplight/spectral-parsers/node_modules/@stoplight/json": { + "version": "3.20.3", + "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.20.3.tgz", + "integrity": "sha512-2m+Km6CkEPWj+H+CXxFyQB9+mVK8ifz9izK0UZpz4G1ZBx2Pd2hI+qw24FJ+X3DTYtMPYIeINTOEaTFWOmbRxQ==", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.3", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^13.6.0", + "jsonc-parser": "~2.2.1", + "lodash": "^4.17.21", + "safe-stable-stringify": "^1.1" + }, + "engines": { + "node": ">=8.3.0" + } + }, + "node_modules/@stoplight/spectral-ref-resolver": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-ref-resolver/-/spectral-ref-resolver-1.0.3.tgz", + "integrity": "sha512-pj+bH4SH8hcWlnV787WD7P0/En7LA3EfZMvG1JUGMW/7bFd9AaZZXNkh5j0ve8qnPlwP8F4SH/2Cnr1tXOXCVw==", + "dependencies": { + "@stoplight/json-ref-readers": "1.2.2", + "@stoplight/json-ref-resolver": "~3.1.5", + "@stoplight/spectral-runtime": "^1.1.2", + "dependency-graph": "0.11.0", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@stoplight/spectral-runtime": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-runtime/-/spectral-runtime-1.1.2.tgz", + "integrity": "sha512-fr5zRceXI+hrl82yAVoME+4GvJie8v3wmOe9tU+ZLRRNonizthy8qDi0Z/z4olE+vGreSDcuDOZ7JjRxFW5kTw==", + "dependencies": { + "@stoplight/json": "^3.17.0", + "@stoplight/path": "^1.3.2", + "@stoplight/types": "^12.3.0", + "abort-controller": "^3.0.0", + "lodash": "^4.17.21", + "node-fetch": "^2.6.7", + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@stoplight/spectral-runtime/node_modules/@stoplight/types": { + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-12.5.0.tgz", + "integrity": "sha512-dwqYcDrGmEyUv5TWrDam5TGOxU72ufyQ7hnOIIDdmW5ezOwZaBFoR5XQ9AsH49w7wgvOqB2Bmo799pJPWnpCbg==", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@stoplight/types": { + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.15.0.tgz", + "integrity": "sha512-pBLjVRrWGVd+KzTbL3qrmufSKIEp0UfziDBdt/nrTHPKrlrtVwaHdrrQMcpM23yJDU1Wcg4cHvhIuGtKCT5OmA==", + "dependencies": { + "@types/json-schema": "^7.0.4", + "utility-types": "^3.10.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + } + }, + "node_modules/@stoplight/yaml": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/@stoplight/yaml/-/yaml-4.2.3.tgz", + "integrity": "sha512-Mx01wjRAR9C7yLMUyYFTfbUf5DimEpHMkRDQ1PKLe9dfNILbgdxyrncsOXM3vCpsQ1Hfj4bPiGl+u4u6e9Akqw==", + "dependencies": { + "@stoplight/ordered-object-literal": "^1.0.1", + "@stoplight/types": "^13.0.0", + "@stoplight/yaml-ast-parser": "0.0.48", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=10.8" + } + }, + "node_modules/@stoplight/yaml-ast-parser": { + "version": "0.0.48", + "resolved": "https://registry.npmjs.org/@stoplight/yaml-ast-parser/-/yaml-ast-parser-0.0.48.tgz", + "integrity": "sha512-sV+51I7WYnLJnKPn2EMWgS4EUfoP4iWEbrWwbXsj0MZCB/xOK8j6+C9fntIdOM50kpx45ZLC3s6kwKivWuqvyg==" + }, + "node_modules/@types/es-aggregate-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/es-aggregate-error/-/es-aggregate-error-1.0.2.tgz", + "integrity": "sha512-erqUpFXksaeR2kejKnhnjZjbFxUpGZx4Z7ydNL9ie8tEhXPiZTsLeUDJ6aR1F8j5wWUAtOAQWUqkc7givBJbBA==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==" + }, + "node_modules/@types/node": { + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", + "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" + }, + "node_modules/@types/urijs": { + "version": "1.19.19", + "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.19.tgz", + "integrity": "sha512-FDJNkyhmKLw7uEvTxx5tSXfPeQpO0iy73Ry+PmYZJvQy0QIWX8a7kJ4kLWRf+EbTPJEPDSgPXHaM7pzr5lmvCg==" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/ajv": { + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-draft-04": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz", + "integrity": "sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==", + "peerDependencies": { + "ajv": "^8.5.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-3.0.0.tgz", + "integrity": "sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ==", + "peerDependencies": { + "ajv": "^8.0.1" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/astring": { + "version": "1.8.6", + "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", + "integrity": "sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==", + "bin": { + "astring": "bin/astring" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/avsc": { + "version": "5.7.7", + "resolved": "https://registry.npmjs.org/avsc/-/avsc-5.7.7.tgz", + "integrity": "sha512-9cYNccliXZDByFsFliVwk5GvTq058Fj513CiR4E60ndDwmuXzTJEp/Bp8FyuRmGyYupLjHLs+JA9/CBoVS4/NQ==", + "engines": { + "node": ">=0.11" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/commander": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/define-properties": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", + "dependencies": { + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dependency-graph": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", + "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/es-abstract": { + "version": "1.21.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", + "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.0", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-aggregate-error": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/es-aggregate-error/-/es-aggregate-error-1.0.9.tgz", + "integrity": "sha512-fvnX40sb538wdU6r4s35cq4EY6Lr09Upj40BEVem4LEsuW8XgQep9yD5Q1U2KftokNp1rWODFJ2qwZSsAjFpbg==", + "dependencies": { + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "function-bind": "^1.1.1", + "functions-have-names": "^1.2.3", + "get-intrinsic": "^1.1.3", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-memoize": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", + "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==" + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/immer": { + "version": "9.0.21", + "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", + "integrity": "sha512-bc4NBHqOqSfRW7POMkHd51LvClaeMXpm8dx0e8oE2GORbq5aRK7Bxl4FyzVLdGtLmvLKL7BTDBG5ACQm4HWjTA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/immer" + } + }, + "node_modules/internal-slot": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", + "dependencies": { + "get-intrinsic": "^1.2.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsep": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.8.tgz", + "integrity": "sha512-qofGylTGgYj9gZFsHuyWAN4jr35eJ66qJCK4eKDnldohuUoQFbU3iZn2zjvEbd9wOAhP9Wx5DsAAduTyE1PSWQ==", + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/json-schema-migrate": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-0.2.0.tgz", + "integrity": "sha512-dq4/oHWmtw/+0ytnXsDqVn+VsVweTEmzm5jLgguPn9BjSzn6/q58ZiZx3BHiQyJs612f0T5Z+MrUEUUY5DHsRg==", + "dependencies": { + "ajv": "^5.0.0" + } + }, + "node_modules/json-schema-migrate/node_modules/ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha512-Ajr4IcMXq/2QmMkEmSvxqfLN5zGmJ92gHXAeOXq1OekoH2rfDNsgdDoL2f7QaRCy7G/E6TpxBVdRuNraMztGHw==", + "dependencies": { + "co": "^4.6.0", + "fast-deep-equal": "^1.0.0", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.3.0" + } + }, + "node_modules/json-schema-migrate/node_modules/fast-deep-equal": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha512-fueX787WZKCV0Is4/T2cyAdM4+x1S3MXXOAhavE1ys/W42SHAPacLTQhucja22QBYrfGw50M2sRiXPtTGv9Ymw==" + }, + "node_modules/json-schema-migrate/node_modules/json-schema-traverse": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", + "integrity": "sha512-4JD/Ivzg7PoW8NzdrBSr3UFwC9mHgvI7Z6z3QGBsSHgKaRTUDmyZAAKJo2UbG1kUVfS9WS8bi36N49U1xw43DA==" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/jsonc-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", + "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==" + }, + "node_modules/jsonpath-plus": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz", + "integrity": "sha512-zBfiUPM5nD0YZSBT/o/fbCUlCcepMIdP0CJZxM1+KgA4f2T206f6VAg9e7mX35+KlMaIc5qXW34f3BnwJ3w+RA==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash.topath": { + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", + "integrity": "sha512-1/W4dM+35DwvE/iEd1M9ekewOSTlpFekhw9mhAtrwjVqUr83/ilQiyAvmg4tVX7Unkcfl1KC+i9WdaT4B6aQcg==" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/nimma": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/nimma/-/nimma-0.2.2.tgz", + "integrity": "sha512-V52MLl7BU+tH2Np9tDrIXK8bql3MVUadnMIl/0/oZSGC9keuro0O9UUv9QKp0aMvtN8HRew4G7byY7H4eWsxaQ==", + "dependencies": { + "@jsep-plugin/regex": "^1.0.1", + "@jsep-plugin/ternary": "^1.0.2", + "astring": "^1.8.1", + "jsep": "^1.2.0" + }, + "engines": { + "node": "^12.20 || >=14.13" + }, + "optionalDependencies": { + "jsonpath-plus": "^6.0.1", + "lodash.topath": "^4.5.2" + } + }, + "node_modules/nimma/node_modules/jsonpath-plus": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-6.0.1.tgz", + "integrity": "sha512-EvGovdvau6FyLexFH2OeXfIITlgIbgZoAZe3usiySeaIDm5QS+A10DKNpaPBBqqRSZr2HN6HVNXxtwUAr2apEw==", + "optional": true, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/pony-cause": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pony-cause/-/pony-cause-1.1.1.tgz", + "integrity": "sha512-PxkIc/2ZpLiEzQXu5YRDOUgBlfGYBY8156HY5ZcRAwwonMk5W/MrJP2LLkG/hF7GEQzaHo2aS7ho6ZLCOvf+6g==", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/ramldt2jsonschema": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/ramldt2jsonschema/-/ramldt2jsonschema-1.2.3.tgz", + "integrity": "sha512-+wLDAV2NNv9NkfEUOYStaDu/6RYgYXeC1zLtXE+dMU/jDfjpN4iJnBGycDwFTFaIQGosOQhxph7fEX6Mpwxdug==", + "dependencies": { + "commander": "^5.0.0", + "js-yaml": "^3.14.0", + "json-schema-migrate": "^0.2.0", + "webapi-parser": "^0.5.0" + }, + "bin": { + "dt2js": "bin/dt2js.js", + "js2dt": "bin/js2dt.js" + } + }, + "node_modules/ramldt2jsonschema/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/ramldt2jsonschema/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-stable-stringify": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", + "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-eval": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-eval/-/simple-eval-1.0.0.tgz", + "integrity": "sha512-kpKJR+bqTscgC0xuAl2xHN6bB12lHjC2DCUfqjAx19bQyO3R2EVLOurm3H9AUltv/uFVcSCVNc6faegR+8NYLw==", + "dependencies": { + "jsep": "^1.1.2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" + }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/tslib": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", + "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urijs": { + "version": "1.19.11", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", + "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==" + }, + "node_modules/utility-types": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz", + "integrity": "sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/webapi-parser": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/webapi-parser/-/webapi-parser-0.5.0.tgz", + "integrity": "sha512-fPt6XuMqLSvBz8exwX4QE1UT+pROLHa00EMDCdO0ybICduwQ1V4f7AWX4pNOpCp+x+0FjczEsOxtQU0d8L3QKw==", + "dependencies": { + "ajv": "6.5.2" + } + }, + "node_modules/webapi-parser/node_modules/ajv": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz", + "integrity": "sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA==", + "dependencies": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.1" + } + }, + "node_modules/webapi-parser/node_modules/fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==" + }, + "node_modules/webapi-parser/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + } + } +} diff --git a/scripts/converter/package.json b/scripts/converter/package.json new file mode 100644 index 000000000..6239e20b7 --- /dev/null +++ b/scripts/converter/package.json @@ -0,0 +1,12 @@ +{ + "name": "converter", + "description": "This script converts the official examples to newer versions once released.", + "dependencies": { + "@asyncapi/converter": "1.2.1", + "js-yaml": "^4.1.0" + }, + "main": "index.js", + "scripts": { + "convert": "node index.js" + } +} From 7ef00c4f70344c75acfc78d5302af87d120a4172 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 22 Jun 2023 16:19:35 +0200 Subject: [PATCH 3/7] update examples --- examples/social-media/backend/asyncapi.yaml | 100 ++++++++++++------ .../comments-service/asyncapi.yaml | 65 +++++++----- examples/social-media/common/servers.yaml | 3 +- examples/social-media/frontend/asyncapi.yaml | 34 ++++-- .../notification-service/asyncapi.yaml | 39 ++++--- .../social-media/public-api/asyncapi.yaml | 43 ++++---- scripts/converter/index.js | 28 ++++- 7 files changed, 205 insertions(+), 107 deletions(-) diff --git a/examples/social-media/backend/asyncapi.yaml b/examples/social-media/backend/asyncapi.yaml index 5f7cb94e5..892069483 100644 --- a/examples/social-media/backend/asyncapi.yaml +++ b/examples/social-media/backend/asyncapi.yaml @@ -1,52 +1,84 @@ -asyncapi: 2.2.0 - +asyncapi: 3.0.0 info: title: Website Backend version: 1.0.0 - servers: websiteWebSocketServer: - $ref: '../common/servers.yaml#/websiteWebSocketServer' + $ref: ../common/servers.yaml#/websiteWebSocketServer mosquitto: - url: mqtt://test.mosquitto.org + host: test.mosquitto.org protocol: mqtt + tags: + - name: 'env:production' + description: This environment is meant for production use case + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:public' + description: This resource is public and available to everyone bindings: mqtt: clientId: websocketServer - tags: - - name: "env:production" - description: "This environment is meant for production use case" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:public" - description: "This resource is public and available to everyone" - channels: comment/liked: + address: comment/liked + messages: + subscribe.message: + $ref: ../common/messages.yaml#/commentLiked description: Notify all the services that a comment has been liked. - servers: ['mosquitto'] - subscribe: - message: - $ref: '../common/messages.yaml#/commentLiked' + servers: + - $ref: '#/servers/mosquitto' like/comment: + address: like/comment + messages: + publish.message: + $ref: ../common/messages.yaml#/likeComment description: When a comment like is received from the frontend. - servers: ['websiteWebSocketServer'] - publish: - message: - $ref: '../common/messages.yaml#/likeComment' - comment/{commentId}/changed: - description: When an event from the broker arrives telling us to update the comment likes count on the frontend. - parameters: + servers: + - $ref: '#/servers/websiteWebSocketServer' + 'comment/{commentId}/changed': + address: 'comment/{commentId}/changed' + messages: + publish.message: + $ref: ../common/messages.yaml#/commentChanged + description: >- + When an event from the broker arrives telling us to update the comment + likes count on the frontend. + servers: + - $ref: '#/servers/mosquitto' + parameters: commentId: - schema: - $ref: '../common/schemas.yaml#/commentId' - servers: ['mosquitto'] - publish: - message: - $ref: '../common/messages.yaml#/commentChanged' + schema: + $ref: ../common/schemas.yaml#/commentId update/comment/likes: + address: update/comment/likes + messages: + subscribe.message: + $ref: ../common/messages.yaml#/updateCommentLikes description: Update comment likes count in the frontend. - servers: ['websiteWebSocketServer'] - subscribe: - message: - $ref: '../common/messages.yaml#/updateCommentLikes' \ No newline at end of file + servers: + - $ref: '#/servers/websiteWebSocketServer' +operations: + comment/liked.subscribe: + action: send + channel: + $ref: '#/channels/comment~1liked' + messages: + - $ref: ../common/messages.yaml#/commentLiked + like/comment.publish: + action: receive + channel: + $ref: '#/channels/like~1comment' + messages: + - $ref: ../common/messages.yaml#/likeComment + 'comment/{commentId}/changed.publish': + action: receive + channel: + $ref: '#/channels/comment~1{commentId}~1changed' + messages: + - $ref: ../common/messages.yaml#/commentChanged + update/comment/likes.subscribe: + action: send + channel: + $ref: '#/channels/update~1comment~1likes' + messages: + - $ref: ../common/messages.yaml#/updateCommentLikes diff --git a/examples/social-media/comments-service/asyncapi.yaml b/examples/social-media/comments-service/asyncapi.yaml index ce8f93a9e..ceb65d61c 100644 --- a/examples/social-media/comments-service/asyncapi.yaml +++ b/examples/social-media/comments-service/asyncapi.yaml @@ -1,38 +1,53 @@ -asyncapi: 2.2.0 - +asyncapi: 3.0.0 info: title: Comments Service version: 1.0.0 description: This service is in charge of processing all the events related to comments. - servers: mosquitto: - url: mqtt://test.mosquitto.org + host: test.mosquitto.org protocol: mqtt + tags: + - name: 'env:production' + description: This environment is meant for production use case + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:public' + description: This resource is public and available to everyone bindings: mqtt: clientId: comment-service - tags: - - name: "env:production" - description: "This environment is meant for production use case" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:public" - description: "This resource is public and available to everyone" - channels: comment/liked: - description: Updates the likes count in the database and sends the new count to the broker. - publish: - message: - $ref: '../common/messages.yaml#/commentLiked' - comment/{commentId}/changed: - description: Sends the new count to the broker after it has been updated in the database. - parameters: + address: comment/liked + messages: + publish.message: + $ref: ../common/messages.yaml#/commentLiked + description: >- + Updates the likes count in the database and sends the new count to the + broker. + 'comment/{commentId}/changed': + address: 'comment/{commentId}/changed' + messages: + subscribe.message: + $ref: ../common/messages.yaml#/commentChanged + description: >- + Sends the new count to the broker after it has been updated in the + database. + parameters: commentId: - schema: - $ref: '../common/schemas.yaml#/commentId' - subscribe: - message: - $ref: '../common/messages.yaml#/commentChanged' - + schema: + $ref: ../common/schemas.yaml#/commentId +operations: + comment/liked.publish: + action: receive + channel: + $ref: '#/channels/comment~1liked' + messages: + - $ref: ../common/messages.yaml#/commentLiked + 'comment/{commentId}/changed.subscribe': + action: send + channel: + $ref: '#/channels/comment~1{commentId}~1changed' + messages: + - $ref: ../common/messages.yaml#/commentChanged diff --git a/examples/social-media/common/servers.yaml b/examples/social-media/common/servers.yaml index bb32c3802..288b0cce7 100644 --- a/examples/social-media/common/servers.yaml +++ b/examples/social-media/common/servers.yaml @@ -1,3 +1,4 @@ websiteWebSocketServer: - url: ws://mycompany.com/ws + host: mycompany.com + pathname: /ws protocol: ws \ No newline at end of file diff --git a/examples/social-media/frontend/asyncapi.yaml b/examples/social-media/frontend/asyncapi.yaml index 2837fb6ff..0257336a6 100644 --- a/examples/social-media/frontend/asyncapi.yaml +++ b/examples/social-media/frontend/asyncapi.yaml @@ -1,21 +1,33 @@ -asyncapi: 2.2.0 - +asyncapi: 3.0.0 info: title: Website WebSocket Client version: 1.0.0 - servers: websiteWebSocketServer: - $ref: '../common/servers.yaml#/websiteWebSocketServer' - + $ref: ../common/servers.yaml#/websiteWebSocketServer channels: like/comment: + address: like/comment + messages: + subscribe.message: + $ref: ../common/messages.yaml#/likeComment description: Notify the backend that a comment has been liked. - subscribe: - message: - $ref: '../common/messages.yaml#/likeComment' update/comment/likes: + address: update/comment/likes + messages: + publish.message: + $ref: ../common/messages.yaml#/updateCommentLikes description: Update the UI when the comment likes count is updated. - publish: - message: - $ref: '../common/messages.yaml#/updateCommentLikes' \ No newline at end of file +operations: + like/comment.subscribe: + action: send + channel: + $ref: '#/channels/like~1comment' + messages: + - $ref: ../common/messages.yaml#/likeComment + update/comment/likes.publish: + action: receive + channel: + $ref: '#/channels/update~1comment~1likes' + messages: + - $ref: ../common/messages.yaml#/updateCommentLikes diff --git a/examples/social-media/notification-service/asyncapi.yaml b/examples/social-media/notification-service/asyncapi.yaml index be78362c9..858f3e2eb 100644 --- a/examples/social-media/notification-service/asyncapi.yaml +++ b/examples/social-media/notification-service/asyncapi.yaml @@ -1,27 +1,34 @@ -asyncapi: 2.2.0 - +asyncapi: 3.0.0 info: title: Notifications Service version: 1.0.0 - servers: mosquitto: - url: mqtt://test.mosquitto.org + host: test.mosquitto.org protocol: mqtt + tags: + - name: 'env:production' + description: This environment is meant for production use case + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:public' + description: This resource is public and available to everyone bindings: mqtt: clientId: notification-service - tags: - - name: "env:production" - description: "This environment is meant for production use case" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:public" - description: "This resource is public and available to everyone" - channels: comment/liked: - description: When a "comment has been liked" message is received, it sends an SMS or push notification to the author. - publish: - message: - $ref: '../common/messages.yaml#/commentLiked' \ No newline at end of file + address: comment/liked + messages: + publish.message: + $ref: ../common/messages.yaml#/commentLiked + description: >- + When a "comment has been liked" message is received, it sends an SMS or + push notification to the author. +operations: + comment/liked.publish: + action: receive + channel: + $ref: '#/channels/comment~1liked' + messages: + - $ref: ../common/messages.yaml#/commentLiked diff --git a/examples/social-media/public-api/asyncapi.yaml b/examples/social-media/public-api/asyncapi.yaml index 0a7cdde79..9c6ec1b72 100644 --- a/examples/social-media/public-api/asyncapi.yaml +++ b/examples/social-media/public-api/asyncapi.yaml @@ -1,28 +1,35 @@ -asyncapi: 2.2.0 - +asyncapi: 3.0.0 info: - title: Public API - description: Public API for others to interact with the system + title: Public API version: 1.0.0 - + description: Public API for others to interact with the system servers: mosquitto: - url: mqtt://test.mosquitto.org + host: test.mosquitto.org protocol: mqtt + tags: + - name: 'env:production' + description: This environment is meant for production use case + - name: 'kind:remote' + description: This server is a remote server. Not exposed by the application + - name: 'visibility:public' + description: This resource is public and available to everyone bindings: mqtt: clientId: public-api - tags: - - name: "env:production" - description: "This environment is meant for production use case" - - name: "kind:remote" - description: "This server is a remote server. Not exposed by the application" - - name: "visibility:public" - description: "This resource is public and available to everyone" - channels: comment/liked: - description: Others are publishing to you, whenever a comment is liked, for you to do react to such an event. - publish: - message: - $ref: '../common/messages.yaml#/commentLiked' \ No newline at end of file + address: comment/liked + messages: + publish.message: + $ref: ../common/messages.yaml#/commentLiked + description: >- + Others are publishing to you, whenever a comment is liked, for you to do + react to such an event. +operations: + comment/liked.publish: + action: receive + channel: + $ref: '#/channels/comment~1liked' + messages: + - $ref: ../common/messages.yaml#/commentLiked diff --git a/scripts/converter/index.js b/scripts/converter/index.js index fec4bc976..edd1fdf56 100644 --- a/scripts/converter/index.js +++ b/scripts/converter/index.js @@ -5,11 +5,26 @@ const jsYaml = require('js-yaml'); const examplesDirectory = path.resolve(__dirname, '../../examples'); const toVersion = '3.0.0'; +/** + * This function converts a single example file into a newer version and overwrite the old one. + * + * @param {*} exampleFile full path to file + */ function convertExample(exampleFile) { console.warn(`Converting: ${exampleFile}`); const document = fs.readFileSync(exampleFile, 'utf-8'); const loadedDocument = jsYaml.load(document); - if(loadedDocument.asyncapi === toVersion) { + if(loadedDocument.asyncapi === undefined) { + //Probably encountered a common file (used in other files), ignore + console.error(` +___________________________________________________________________________________ + !!!Manual change required!!! + + ${exampleFile} is a shared resource among other AsyncAPI documents, make sure to manually inspect this! + +___________________________________________________________________________________`); + return; + } else if(loadedDocument.asyncapi === toVersion) { console.warn(`${exampleFile} is already version ${toVersion}`); return; } @@ -17,12 +32,21 @@ function convertExample(exampleFile) { fs.writeFileSync(exampleFile, convertedDocument); } +/** + * Convert all examples within a single directory and nested directories. + * + * @param {*} directoryPath full path to a directory to convert examples from. + */ async function convertExampleDir(directoryPath) { let examplesFiles = await fs.promises.readdir(directoryPath); examplesFiles = examplesFiles.map((file) => path.resolve(directoryPath, file)); const nestedDirectory = examplesFiles.filter((file) => fs.lstatSync(file).isDirectory()); + for (const dir of nestedDirectory) { + await convertExampleDir(dir); + } + // only convert .yml files - examplesFiles = examplesFiles.filter((file) => path.extname(file) === '.yml'); + examplesFiles = examplesFiles.filter((file) => path.extname(file) === '.yml' || path.extname(file) === '.yaml'); examplesFiles.forEach(convertExample); } From 631846e8a02a30f29d10c5ae49fa3dadd766108a Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 26 Jul 2023 11:49:24 +0200 Subject: [PATCH 4/7] update examples --- examples/application-headers.yml | 2 - examples/correlation-id.yml | 2 - examples/gitter-streaming.yml | 14 +- examples/mercure.yml | 4 +- examples/rpc-client.yml | 5 +- examples/rpc-server.yml | 5 +- examples/social-media/backend/asyncapi.yaml | 4 +- .../comments-service/asyncapi.yaml | 4 +- examples/social-media/common/servers.yaml | 3 +- examples/streetlights-kafka.yml | 2 - examples/streetlights-mqtt.yml | 2 - examples/streetlights-operation-security.yml | 2 - examples/websocket-gemini.yml | 130 +++++------ scripts/converter/index.js | 3 +- scripts/converter/package-lock.json | 221 +++++++++++------- scripts/converter/package.json | 2 +- 16 files changed, 216 insertions(+), 189 deletions(-) diff --git a/examples/application-headers.yml b/examples/application-headers.yml index 5dceb710c..2c397f5ed 100644 --- a/examples/application-headers.yml +++ b/examples/application-headers.yml @@ -85,5 +85,3 @@ components: parameters: streetlightId: description: The ID of the streetlight. - schema: - type: string diff --git a/examples/correlation-id.yml b/examples/correlation-id.yml index f6048d1f2..41309194a 100644 --- a/examples/correlation-id.yml +++ b/examples/correlation-id.yml @@ -138,8 +138,6 @@ components: parameters: streetlightId: description: The ID of the streetlight. - schema: - type: string correlationIds: sentAtCorrelator: description: Data from message payload used as correlation ID diff --git a/examples/gitter-streaming.yml b/examples/gitter-streaming.yml index 57a8eaabe..cb987bbcb 100644 --- a/examples/gitter-streaming.yml +++ b/examples/gitter-streaming.yml @@ -22,17 +22,13 @@ channels: parameters: roomId: description: Id of the Gitter room. - schema: - type: string - examples: - - 53307860c3599d1de448e19d + examples: + - 53307860c3599d1de448e19d resource: + enum: + - chatMessages + - events description: The resource to consume. - schema: - type: string - enum: - - chatMessages - - events operations: '/rooms/{roomId}/{resource}.subscribe': action: send diff --git a/examples/mercure.yml b/examples/mercure.yml index 91bd55394..33ec12fd1 100644 --- a/examples/mercure.yml +++ b/examples/mercure.yml @@ -22,9 +22,7 @@ channels: modified, a JSON-LD representation of the new version of this resource must be pushed in this Mercure topic. parameters: - id: - schema: - type: integer + id: {} operations: 'https://example.com/books/{id}.publish': action: receive diff --git a/examples/rpc-client.yml b/examples/rpc-client.yml index bdd7fde7c..dd35d2de5 100644 --- a/examples/rpc-client.yml +++ b/examples/rpc-client.yml @@ -24,10 +24,7 @@ channels: examples: - 7 parameters: - queue: - schema: - type: string - pattern: ^amq\\.gen\\-.+$ + queue: {} bindings: amqp: is: queue diff --git a/examples/rpc-server.yml b/examples/rpc-server.yml index f53ca1b9d..de1f8ca43 100644 --- a/examples/rpc-server.yml +++ b/examples/rpc-server.yml @@ -24,10 +24,7 @@ channels: examples: - 7 parameters: - queue: - schema: - type: string - pattern: ^amq\\.gen\\-.+$ + queue: {} bindings: amqp: is: queue diff --git a/examples/social-media/backend/asyncapi.yaml b/examples/social-media/backend/asyncapi.yaml index 892069483..b93a16dc3 100644 --- a/examples/social-media/backend/asyncapi.yaml +++ b/examples/social-media/backend/asyncapi.yaml @@ -46,9 +46,7 @@ channels: servers: - $ref: '#/servers/mosquitto' parameters: - commentId: - schema: - $ref: ../common/schemas.yaml#/commentId + commentId: {} update/comment/likes: address: update/comment/likes messages: diff --git a/examples/social-media/comments-service/asyncapi.yaml b/examples/social-media/comments-service/asyncapi.yaml index ceb65d61c..db4f3603f 100644 --- a/examples/social-media/comments-service/asyncapi.yaml +++ b/examples/social-media/comments-service/asyncapi.yaml @@ -35,9 +35,7 @@ channels: Sends the new count to the broker after it has been updated in the database. parameters: - commentId: - schema: - $ref: ../common/schemas.yaml#/commentId + commentId: {} operations: comment/liked.publish: action: receive diff --git a/examples/social-media/common/servers.yaml b/examples/social-media/common/servers.yaml index 288b0cce7..bb32c3802 100644 --- a/examples/social-media/common/servers.yaml +++ b/examples/social-media/common/servers.yaml @@ -1,4 +1,3 @@ websiteWebSocketServer: - host: mycompany.com - pathname: /ws + url: ws://mycompany.com/ws protocol: ws \ No newline at end of file diff --git a/examples/streetlights-kafka.yml b/examples/streetlights-kafka.yml index 79fed621f..0affab93b 100644 --- a/examples/streetlights-kafka.yml +++ b/examples/streetlights-kafka.yml @@ -183,8 +183,6 @@ components: parameters: streetlightId: description: The ID of the streetlight. - schema: - type: string messageTraits: commonHeaders: headers: diff --git a/examples/streetlights-mqtt.yml b/examples/streetlights-mqtt.yml index 27536c4cd..7a3fb23cb 100644 --- a/examples/streetlights-mqtt.yml +++ b/examples/streetlights-mqtt.yml @@ -241,8 +241,6 @@ components: parameters: streetlightId: description: The ID of the streetlight. - schema: - type: string messageTraits: commonHeaders: headers: diff --git a/examples/streetlights-operation-security.yml b/examples/streetlights-operation-security.yml index ec025e418..a29723e9c 100644 --- a/examples/streetlights-operation-security.yml +++ b/examples/streetlights-operation-security.yml @@ -224,8 +224,6 @@ components: parameters: streetlightId: description: The ID of the streetlight. - schema: - type: string messageTraits: commonHeaders: headers: diff --git a/examples/websocket-gemini.yml b/examples/websocket-gemini.yml index 6e6fc7c75..cc1cd9193 100644 --- a/examples/websocket-gemini.yml +++ b/examples/websocket-gemini.yml @@ -32,76 +32,74 @@ channels: $ref: '#/components/messages/marketData' parameters: symbol: + enum: + - btcusd + - ethbtc + - ethusd + - zecusd + - zecbtc + - zeceth + - zecbch + - zecltc + - bchusd + - bchbtc + - bcheth + - ltcusd + - ltcbtc + - ltceth + - ltcbch + - batusd + - daiusd + - linkusd + - oxtusd + - batbtc + - linkbtc + - oxtbtc + - bateth + - linketh + - oxteth + - ampusd + - compusd + - paxgusd + - mkrusd + - zrxusd + - kncusd + - manausd + - storjusd + - snxusd + - crvusd + - balusd + - uniusd + - renusd + - umausd + - yfiusd + - btcdai + - ethdai + - aaveusd + - filusd + - btceur + - btcgbp + - etheur + - ethgbp + - btcsgd + - ethsgd + - sklusd + - grtusd + - bntusd + - 1inchusd + - enjusd + - lrcusd + - sandusd + - cubeusd + - lptusd + - bondusd + - maticusd + - injusd + - sushiusd description: > Symbols are formatted as CCY1CCY2 where prices are in CCY2 and quantities are in CCY1. To read more click [here](https://docs.sandbox.gemini.com/websocket-api/#symbols-and-minimums). - schema: - type: string - enum: - - btcusd - - ethbtc - - ethusd - - zecusd - - zecbtc - - zeceth - - zecbch - - zecltc - - bchusd - - bchbtc - - bcheth - - ltcusd - - ltcbtc - - ltceth - - ltcbch - - batusd - - daiusd - - linkusd - - oxtusd - - batbtc - - linkbtc - - oxtbtc - - bateth - - linketh - - oxteth - - ampusd - - compusd - - paxgusd - - mkrusd - - zrxusd - - kncusd - - manausd - - storjusd - - snxusd - - crvusd - - balusd - - uniusd - - renusd - - umausd - - yfiusd - - btcdai - - ethdai - - aaveusd - - filusd - - btceur - - btcgbp - - etheur - - ethgbp - - btcsgd - - ethsgd - - sklusd - - grtusd - - bntusd - - 1inchusd - - enjusd - - lrcusd - - sandusd - - cubeusd - - lptusd - - bondusd - - maticusd - - injusd - - sushiusd bindings: ws: bindingVersion: 0.1.0 diff --git a/scripts/converter/index.js b/scripts/converter/index.js index edd1fdf56..02866b535 100644 --- a/scripts/converter/index.js +++ b/scripts/converter/index.js @@ -16,8 +16,7 @@ function convertExample(exampleFile) { const loadedDocument = jsYaml.load(document); if(loadedDocument.asyncapi === undefined) { //Probably encountered a common file (used in other files), ignore - console.error(` -___________________________________________________________________________________ + console.error(`___________________________________________________________________________________ !!!Manual change required!!! ${exampleFile} is a shared resource among other AsyncAPI documents, make sure to manually inspect this! diff --git a/scripts/converter/package-lock.json b/scripts/converter/package-lock.json index 3f07ccc21..2654cba02 100644 --- a/scripts/converter/package-lock.json +++ b/scripts/converter/package-lock.json @@ -6,14 +6,14 @@ "": { "name": "converter", "dependencies": { - "@asyncapi/converter": "1.2.1", + "@asyncapi/converter": "1.3.1", "js-yaml": "^4.1.0" } }, "node_modules/@asyncapi/converter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@asyncapi/converter/-/converter-1.2.1.tgz", - "integrity": "sha512-n1Us4a5vPd3YbARVABetALTEJHah//qc8g+UeSCcZ9xFfryH8iYr16MNfP0vd/IV4ZWJlBy/LWenZOpTyXs9wQ==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@asyncapi/converter/-/converter-1.3.1.tgz", + "integrity": "sha512-aLbJTGaaqP6IHc+ggi/feQ8oynP/2iEd4S0JuSyWZFSYSR2uAXsDH9FrAEFGPrhD9inbc+p0fTshnhKLNGdJQw==", "dependencies": { "@asyncapi/parser": "^2.0.0-next-major.11", "js-yaml": "^3.14.1" @@ -150,11 +150,11 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@stoplight/json-ref-resolver": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.5.tgz", - "integrity": "sha512-uaKLITor7UF+JBtI84zs3aOWM0L79zp7w9TrBTwPtx5SLbaQQ4HadDKgX5yhFOLMApLdhwhiftF4c0GFanOxGg==", + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.6.tgz", + "integrity": "sha512-YNcWv3R3n3U6iQYBsFOiWSuRGE5su1tJSiX6pAPRVk7dP0L7lqCteXGzuVRQ0gMZqUl8v1P0+fAKxF6PLo9B5A==", "dependencies": { - "@stoplight/json": "^3.17.0", + "@stoplight/json": "^3.21.0", "@stoplight/path": "^1.3.2", "@stoplight/types": "^12.3.0 || ^13.0.0", "@types/urijs": "^1.19.19", @@ -162,7 +162,7 @@ "fast-memoize": "^2.5.2", "immer": "^9.0.6", "lodash": "^4.17.21", - "tslib": "^2.3.1", + "tslib": "^2.6.0", "urijs": "^1.19.11" }, "engines": { @@ -186,12 +186,12 @@ } }, "node_modules/@stoplight/spectral-core": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.0.tgz", - "integrity": "sha512-0aj+IELHvhjoPWoOFj41EJilPbaexUuWFg7GCsiJ3BXrniRp3GnPl+TIZkC1ZuuAr/oi77RviDhW9Gm7ndKB9Q==", + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-core/-/spectral-core-1.18.3.tgz", + "integrity": "sha512-YY8x7X2SWJIhGTLPol+eFiQpWPz0D0mJdkK2i4A0QJG68KkNhypP6+JBC7/Kz3XWjqr0L/RqAd+N5cQLPOKZGQ==", "dependencies": { "@stoplight/better-ajv-errors": "1.0.3", - "@stoplight/json": "~3.20.1", + "@stoplight/json": "~3.21.0", "@stoplight/path": "1.3.2", "@stoplight/spectral-parsers": "^1.0.0", "@stoplight/spectral-ref-resolver": "^1.0.0", @@ -216,22 +216,6 @@ "node": "^12.20 || >= 14.13" } }, - "node_modules/@stoplight/spectral-core/node_modules/@stoplight/json": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.20.3.tgz", - "integrity": "sha512-2m+Km6CkEPWj+H+CXxFyQB9+mVK8ifz9izK0UZpz4G1ZBx2Pd2hI+qw24FJ+X3DTYtMPYIeINTOEaTFWOmbRxQ==", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.3", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^13.6.0", - "jsonc-parser": "~2.2.1", - "lodash": "^4.17.21", - "safe-stable-stringify": "^1.1" - }, - "engines": { - "node": ">=8.3.0" - } - }, "node_modules/@stoplight/spectral-core/node_modules/@stoplight/types": { "version": "13.6.0", "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.6.0.tgz", @@ -288,42 +272,26 @@ } }, "node_modules/@stoplight/spectral-parsers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-parsers/-/spectral-parsers-1.0.2.tgz", - "integrity": "sha512-ZQXknJ+BM5Re4Opj4cgVlHgG2qyOk/wznKJq3Vf1qsBEg2CNzN0pJmSB0deRqW0kArqm44qpb8c+cz3F2rgMtw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-parsers/-/spectral-parsers-1.0.3.tgz", + "integrity": "sha512-J0KW5Rh5cHWnJQ3yN+cr/ijNFVirPSR0pkQbdrNX30VboEl083UEDrQ3yov9kjLVIWEk9t9kKE7Eo3QT/k4JLA==", "dependencies": { - "@stoplight/json": "~3.20.1", + "@stoplight/json": "~3.21.0", "@stoplight/types": "^13.6.0", "@stoplight/yaml": "~4.2.3", "tslib": "^2.3.1" }, "engines": { - "node": ">=12" - } - }, - "node_modules/@stoplight/spectral-parsers/node_modules/@stoplight/json": { - "version": "3.20.3", - "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.20.3.tgz", - "integrity": "sha512-2m+Km6CkEPWj+H+CXxFyQB9+mVK8ifz9izK0UZpz4G1ZBx2Pd2hI+qw24FJ+X3DTYtMPYIeINTOEaTFWOmbRxQ==", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.3", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^13.6.0", - "jsonc-parser": "~2.2.1", - "lodash": "^4.17.21", - "safe-stable-stringify": "^1.1" - }, - "engines": { - "node": ">=8.3.0" + "node": "^12.20 || >=14.13" } }, "node_modules/@stoplight/spectral-ref-resolver": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@stoplight/spectral-ref-resolver/-/spectral-ref-resolver-1.0.3.tgz", - "integrity": "sha512-pj+bH4SH8hcWlnV787WD7P0/En7LA3EfZMvG1JUGMW/7bFd9AaZZXNkh5j0ve8qnPlwP8F4SH/2Cnr1tXOXCVw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@stoplight/spectral-ref-resolver/-/spectral-ref-resolver-1.0.4.tgz", + "integrity": "sha512-5baQIYL0NJTSVy8v6RxOR4U51xOUYM8wJri1YvlAT6bPN8m0EIxMwfVYi0xUZEMVeHcWx869nIkoqyWmOutF2A==", "dependencies": { "@stoplight/json-ref-readers": "1.2.2", - "@stoplight/json-ref-resolver": "~3.1.5", + "@stoplight/json-ref-resolver": "~3.1.6", "@stoplight/spectral-runtime": "^1.1.2", "dependency-graph": "0.11.0", "tslib": "^2.3.1" @@ -362,9 +330,9 @@ } }, "node_modules/@stoplight/types": { - "version": "13.15.0", - "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.15.0.tgz", - "integrity": "sha512-pBLjVRrWGVd+KzTbL3qrmufSKIEp0UfziDBdt/nrTHPKrlrtVwaHdrrQMcpM23yJDU1Wcg4cHvhIuGtKCT5OmA==", + "version": "13.17.0", + "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.17.0.tgz", + "integrity": "sha512-9wzSi8MZQXjO+GSYehwMWFSUHO5qtDr282RxrDDsxO9ZHn0a4nWE+kTWDWSdtbiZrIEantTSkycmQJxKxnnRTQ==", "dependencies": { "@types/json-schema": "^7.0.4", "utility-types": "^3.10.0" @@ -406,9 +374,9 @@ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==" }, "node_modules/@types/node": { - "version": "20.3.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.3.1.tgz", - "integrity": "sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==" + "version": "20.4.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.4.tgz", + "integrity": "sha512-CukZhumInROvLq3+b5gLev+vgpsIqC2D0deQr/yS1WnxvmYLlJXZpaQrQiseMY+6xusl79E04UjWoqyr+t1/Ew==" }, "node_modules/@types/urijs": { "version": "1.19.19", @@ -495,6 +463,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/astring": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/astring/-/astring-1.8.6.tgz", @@ -594,17 +581,18 @@ } }, "node_modules/es-abstract": { - "version": "1.21.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.2.tgz", - "integrity": "sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dependencies": { "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.5", - "get-intrinsic": "^1.2.0", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", "globalthis": "^1.0.3", "gopd": "^1.0.1", @@ -624,14 +612,18 @@ "object-inspect": "^1.12.3", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.4.3", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", "safe-regex-test": "^1.0.0", "string.prototype.trim": "^1.2.7", "string.prototype.trimend": "^1.0.6", "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", "typed-array-length": "^1.0.4", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -1048,15 +1040,11 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", - "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.11" }, "engines": { "node": ">= 0.4" @@ -1076,6 +1064,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -1333,6 +1326,23 @@ "node": ">=0.10.0" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -1428,9 +1438,57 @@ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/tslib": { - "version": "2.5.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.3.tgz", - "integrity": "sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==" + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==" + }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/typed-array-length": { "version": "1.0.4", @@ -1539,16 +1597,15 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", - "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.10" + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" diff --git a/scripts/converter/package.json b/scripts/converter/package.json index 6239e20b7..68739aca8 100644 --- a/scripts/converter/package.json +++ b/scripts/converter/package.json @@ -2,7 +2,7 @@ "name": "converter", "description": "This script converts the official examples to newer versions once released.", "dependencies": { - "@asyncapi/converter": "1.2.1", + "@asyncapi/converter": "1.3.1", "js-yaml": "^4.1.0" }, "main": "index.js", From 2fb822ffb157c31d07c2e8c98e2154312f51a81b Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 26 Jul 2023 11:52:19 +0200 Subject: [PATCH 5/7] manually change common servers --- examples/social-media/common/servers.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/social-media/common/servers.yaml b/examples/social-media/common/servers.yaml index bb32c3802..288b0cce7 100644 --- a/examples/social-media/common/servers.yaml +++ b/examples/social-media/common/servers.yaml @@ -1,3 +1,4 @@ websiteWebSocketServer: - url: ws://mycompany.com/ws + host: mycompany.com + pathname: /ws protocol: ws \ No newline at end of file From ed791d06256b8fc20d08c336f691a40ece7bd891 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 2 Aug 2023 14:17:29 +0200 Subject: [PATCH 6/7] update adeo example --- examples/adeo-kafka-request-reply.yml | 61 ++++++++++++++------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/examples/adeo-kafka-request-reply.yml b/examples/adeo-kafka-request-reply.yml index f470e276b..b9a048957 100644 --- a/examples/adeo-kafka-request-reply.yml +++ b/examples/adeo-kafka-request-reply.yml @@ -7,40 +7,41 @@ info: contact: name: AsyncAPI team email: info@asyncapi.io + tags: + - name: costing + description: "Costing channels, used by Costing clients." servers: production: - url: "prod.url:9092" + host: "prod.url:9092" protocol: kafka-secure description: Kafka PRODUCTION cluster security: - - sasl-ssl: [] + - $ref: '#/components/securitySchemes/sasl-ssl' bindings: kafka: schemaRegistryUrl: >- https://schema-registry.prod.url/ staging: - url: "staging.url:9092" + host: "staging.url:9092" protocol: kafka-secure description: Kafka STAGING cluster for `uat` and `preprod` environments security: - - sasl-ssl: [] + - $ref: '#/components/securitySchemes/sasl-ssl' bindings: kafka: schemaRegistryUrl: >- https://schema-registry.staging.url/ dev: - url: "dev.url:9092" + host: "dev.url:9092" protocol: kafka-secure description: Kafka DEV cluster for `dev` and `sit` environments security: - - sasl-ssl: [] + - $ref: '#/components/securitySchemes/sasl-ssl' bindings: kafka: schemaRegistryUrl: >- https://schema-registry.dev.url/ -tags: - - name: costing - description: "Costing channels, used by Costing clients." + channels: costingRequest: address: "adeo-{env}-case-study-COSTING-REQUEST-{version}" @@ -65,8 +66,8 @@ channels: replicas: 3 partitions: 3 topicConfiguration: - cleanup.policy: delete - retention.ms: 7 days + cleanup.policy: [ "delete" ] + retention.ms: 604800000 messages: costingRequest: $ref: "#/components/messages/costingRequestV1" @@ -98,12 +99,6 @@ channels: $ref: "#/components/parameters/Version" bindings: kafka: - groupId: - type: string - description: > - The groupId must be prefixed by your `svc` account, deliver by the - Adeo Kafka team. - This `svc` must have the read access to the topic. x-key.subject.name.strategy: type: string description: > @@ -125,7 +120,6 @@ channels: - operations: requestCosting: action: receive @@ -135,7 +129,7 @@ operations: channel: $ref: '#/channels/costingResponse' address: - locaton: '$message.header#/REPLY_TOPIC' + location: '$message.header#/REPLY_TOPIC' summary: | [COSTING] Request one or more Costing calculation for any product description: > @@ -165,6 +159,14 @@ operations: summary: > [COSTING] Get the costing responses matching an initial Costing Request. + bindings: + kafka: + groupId: + type: string + description: > + The groupId must be prefixed by your `svc` account, deliver by the + Adeo Kafka team. + This `svc` must have the read access to the topic. tags: - name: costing @@ -188,7 +190,6 @@ components: summary: Costing Request V1 inputs. tags: - name: costing - schemaFormat: application/vnd.apache.avro;version=1.9.0 correlationId: $ref: "#/components/correlationIds/costingCorrelationId" headers: @@ -208,7 +209,9 @@ components: REQUESTER_CODE: $ref: "#/components/schemas/RequesterCode" payload: - $ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingRequestPayload.avsc" + schemaFormat: application/vnd.apache.avro;version=1.9.0 + schema: + $ref: "https://www.asyncapi.com/resources/casestudies/adeo/CostingRequestPayload.avsc" costingResponse: name: CostingResponse title: Costing Response @@ -219,7 +222,6 @@ components: Please refer to the `CostingResponseKey.avsc` schema, available on [our github project](https://github.url/). - schemaFormat: application/vnd.apache.avro;version=1.9.0 correlationId: $ref: "#/components/correlationIds/costingCorrelationId" headers: @@ -242,7 +244,9 @@ components: key: $ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponseKey.avsc" payload: - $ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponsePayload.avsc" + schemaFormat: application/vnd.apache.avro;version=1.9.0 + schema: + $ref: "https://deploy-preview-921--asyncapi-website.netlify.app/resources/casestudies/adeo/CostingResponsePayload.avsc" schemas: RequesterId: type: string @@ -303,9 +307,7 @@ components: parameters: Env: description: Adeo Kafka Environement for messages publications. - schema: - type: string - enum: + enum: - dev - sit - uat1 @@ -313,10 +315,9 @@ components: - prod Version: description: the topic version you want to use - schema: - type: string - example: V1 - default: V1 + examples: + - V1 + default: V1 securitySchemes: sasl-ssl: type: plain From 3bfbba9ba27eb728e7d000166454c498efdfd4e0 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 2 Aug 2023 14:23:50 +0200 Subject: [PATCH 7/7] fix kraken v3 example --- ...aken-websocket-request-reply-message-filter-in-reply.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/kraken-websocket-request-reply-message-filter-in-reply.yml b/examples/kraken-websocket-request-reply-message-filter-in-reply.yml index f82a7aa93..932f02274 100644 --- a/examples/kraken-websocket-request-reply-message-filter-in-reply.yml +++ b/examples/kraken-websocket-request-reply-message-filter-in-reply.yml @@ -47,7 +47,7 @@ operations: channel: $ref: '#/channels/currencyExchange' messages: - $ref: '#/components/messages/ping' + - $ref: '#/components/messages/ping' heartbeat: action: receive channel: @@ -64,7 +64,7 @@ operations: channel: $ref: '#/channels/currencyExchange' messages: - $ref: '#/components/messages/subscriptionStatus' + - $ref: '#/components/messages/subscriptionStatus' unsubscribe: action: send channel: @@ -73,7 +73,7 @@ operations: channel: $ref: '#/channels/currencyExchange' messages: - $ref: '#/components/messages/subscriptionStatus' + - $ref: '#/components/messages/subscriptionStatus' components: