Skip to content

Commit

Permalink
docs: add bindings examples on channel and message (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
M3lkior authored Apr 12, 2021
1 parent 271d4c8 commit b902116
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/__snapshots__/integration.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
|-|-|-|
Expand Down
39 changes: 35 additions & 4 deletions test/docs/dummy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ servers:
- '5672'
security:
- user-password: []
dommy-kafka:
dummy-kafka:
url: http://localhost:{port}
protocol: kafka
description: dummy Kafka broker
Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand All @@ -167,7 +196,7 @@ components:
- payload:
prop1: option2
sentAt: 2020-01-31T13:24:53Z


schemas:
dummyCreated:
Expand All @@ -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:
Expand Down Expand Up @@ -305,4 +334,6 @@ components:
kafka:
bindings:
kafka:
clientId: my-app-id
groupId: my-app-group-id
clientId: my-app-client-id
bindingVersion: '0.1.0'

0 comments on commit b902116

Please sign in to comment.