-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser-signedup-avro-ref-asyncapi.yaml
71 lines (71 loc) · 2.18 KB
/
user-signedup-avro-ref-asyncapi.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
asyncapi: '2.0.0'
id: 'urn:io.microcks.example.user-signedup'
info:
title: User signed-up Avro API
version: 0.1.2
description: Sample AsyncAPI for user signedup events defined using Avro
contact:
name: Laurent Broudoux
url: https://github.com/lbroudoux
email: [email protected]
license:
name: MIT License
url: https://opensource.org/licenses/MIT
defaultContentType: application/json
channels:
user/signedup:
description: The topic on which user signed up events may be consumed
subscribe:
summary: Receive informations about user signed up
operationId: receivedUserSIgnedUp
message:
description: An event describing that a user just signed up.
bindings:
kafka:
key:
type: string
description: Timestamp of event as milliseconds since 1st Jan 1970
traits:
- $ref: '#/components/messageTraits/commonHeaders'
headers:
type: object
properties:
sentAt:
type: string
format: date-time
description: Date and time when the event was sent
contentType: avro/binary
schemaFormat: application/vnd.apache.avro+json;version=1.9.0
payload:
$ref: './user-signedup.avsc#/User'
examples:
- laurent:
summary: Example for Laurent user
headers: |-
{"my-app-header": 23, "sentAt": "2020-03-11T08:03:28Z"}
payload: |-
{"fullName": "Laurent Broudoux", "email": "[email protected]", "age": 41}
- john:
summary: Example for John Doe user
headers:
my-app-header: 24
sentAt: "2020-03-11T08:03:38Z"
payload:
fullName: John Doe
email: [email protected]
age: 36
components:
messageTraits:
commonHeaders:
headers:
type: object
properties:
my-app-header:
type: integer
minimum: 0
maximum: 100
examples:
laurent:
my-app-header: 21
yacine:
my-app-header: 22