-
Notifications
You must be signed in to change notification settings - Fork 5
/
petstore-kafka-asyncapi-v1.yaml
142 lines (142 loc) · 3.3 KB
/
petstore-kafka-asyncapi-v1.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
asyncapi: 3.0.0
info:
title: Petstore Kafka v1
description: This is a sample Petstore Server.
version: 1.0.0
license:
name: Aklivity Community License
url: https://github.com/aklivity/zilla/blob/main/LICENSE
contact:
name: Aklivity Community
url: https://www.aklivity.io/slack
externalDocs:
description: Demo Repo
url: https://github.com/aklivity/zilla-demos/tree/main/petstore#readme
defaultContentType: application/json
servers:
local-dev:
host: kafka:29092
protocol: kafka
description: local bitnami/kafka
channels:
petstore:
address: "petstore"
messages:
pet:
$ref: "#/components/messages/pet"
empty:
$ref: "#/components/messages/nullPet"
description: The topic on which pet values may be produced and consumed.
operations:
listPets:
action: receive
channel:
$ref: "#/channels/petstore"
summary: >-
List all pets.
traits:
- $ref: "#/components/operationTraits/kafka"
messages:
- $ref: "#/channels/petstore/messages/pet"
addPet:
action: send
channel:
$ref: "#/channels/petstore"
summary: >-
Add a pet.
traits:
- $ref: "#/components/operationTraits/kafka"
messages:
- $ref: "#/channels/petstore/messages/pet"
getPet:
action: receive
channel:
$ref: "#/channels/petstore"
summary: >-
Get a pet.
traits:
- $ref: "#/components/operationTraits/kafka"
messages:
- $ref: "#/channels/petstore/messages/pet"
updatePet:
action: send
channel:
$ref: "#/channels/petstore"
summary: >-
Update an existing pet by Id.
traits:
- $ref: "#/components/operationTraits/kafka"
messages:
- $ref: "#/channels/petstore/messages/pet"
deletePet:
action: send
channel:
$ref: "#/channels/petstore"
summary: >-
Deletes a pet
traits:
- $ref: "#/components/operationTraits/kafka"
messages:
- $ref: "#/channels/petstore/messages/empty"
components:
messages:
nullPet:
name: NullPet
payload:
type: "null"
pet:
name: Pet
title: Pet
summary: >-
Inform about Pet.
contentType: application/json
traits:
- $ref: "#/components/messageTraits/commonHeaders"
payload:
$ref: "#/components/schemas/petPayload"
pets:
name: Pets
title: Pets
summary: >-
Inform about Pets.
contentType: application/json
traits:
- $ref: "#/components/messageTraits/commonHeaders"
payload:
$ref: "#/components/schemas/petsPayload"
schemas:
petPayload:
type: object
properties:
id:
type: integer
minimum: 0
description: Pet id.
name:
type: string
description: Pet name.
tag:
type: string
description: Tag.
petsPayload:
type: array
maxItems: 100
items:
$ref: "#/components/schemas/petPayload"
messageTraits:
commonHeaders:
headers:
type: object
properties:
my-app-header:
type: integer
minimum: 0
maximum: 100
operationTraits:
kafka:
bindings:
kafka:
clientId:
type: string
enum:
- my-app-id