From b9021168c8818de2caf87fc06ccf6e8ed24992ac Mon Sep 17 00:00:00 2001 From: Ludovic Dussart Date: Mon, 12 Apr 2021 16:56:21 +0200 Subject: [PATCH] docs: add bindings examples on channel and message (#556) --- test/__snapshots__/integration.test.js.snap | 2 +- test/docs/dummy.yml | 39 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/test/__snapshots__/integration.test.js.snap b/test/__snapshots__/integration.test.js.snap index d4581eb46..5283fc9c1 100644 --- a/test/__snapshots__/integration.test.js.snap +++ b/test/__snapshots__/integration.test.js.snap @@ -38,7 +38,7 @@ It's goal is to support development of documentation and code generation with th |-|-|-|-|-|-| | userPassword | - | - | - | - | - | -### **dommy-kafka** Server +### **dummy-kafka** Server | URL | Protocol | Description | |-|-|-| diff --git a/test/docs/dummy.yml b/test/docs/dummy.yml index fae8d8699..c4b2d4031 100644 --- a/test/docs/dummy.yml +++ b/test/docs/dummy.yml @@ -57,7 +57,7 @@ servers: - '5672' security: - user-password: [] - dommy-kafka: + dummy-kafka: url: http://localhost:{port} protocol: kafka description: dummy Kafka broker @@ -106,6 +106,19 @@ channels: is: routingKey subscribe: operationId: receiveSystemInfo + bindings: + amqp: + expiration: 100000 + userId: guest + cc: [ 'user.logs' ] + priority: 10 + deliveryMode: 2 + mandatory: false + bcc: [ 'external.audit' ] + replyTo: user.signedup + timestamp: true + ack: false + bindingVersion: 0.1.0 message: $ref: '#/components/messages/dummyInfo' @@ -142,6 +155,22 @@ components: type: string payload: $ref: "#/components/schemas/dummyCreated" + bindings: + kafka: + key: + type: object + properties: + id: + type: string + format: uuid + type: + type: string + enum: [ 'type1', "type2" ] + bindingVersion: '0.1.0' + amqp: + contentEncoding: gzip + messageType: 'user.signup' + bindingVersion: 0.1.0 dummyInfo: name: dummyInfo title: Dummy system info @@ -167,7 +196,7 @@ components: - payload: prop1: option2 sentAt: 2020-01-31T13:24:53Z - + schemas: dummyCreated: @@ -183,7 +212,7 @@ components: type: integer minimum: 0 x-schema-extensions-as-primitive: dummy - x-schema-extensions-as-array: + x-schema-extensions-as-array: - "item1" - "item2" properties: @@ -305,4 +334,6 @@ components: kafka: bindings: kafka: - clientId: my-app-id \ No newline at end of file + groupId: my-app-group-id + clientId: my-app-client-id + bindingVersion: '0.1.0'