-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
.../src/test/resources/io/github/microcks/util/asyncapi/user-signedup-json-ref-asyncapi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
asyncapi: '2.4.0' | ||
id: 'urn:io.microcks.example.user-signedup' | ||
info: | ||
title: User signed-up API | ||
version: 0.1.0 | ||
description: Sample AsyncAPI for user signedup events | ||
contact: | ||
name: Laurent Broudoux | ||
url: https://github.com/lbroudoux | ||
email: laurent.broudoux@gmail.com | ||
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 | ||
payload: | ||
$ref: '#/components/schemas/UserSignedupEvent' | ||
examples: | ||
- laurent: | ||
summary: Example for Laurent user | ||
headers: |- | ||
{"my-app-header": 23, "sentAt": "2020-03-11T08:03:28Z"} | ||
payload: |- | ||
{"fullName": "Laurent Broudoux", "email": "laurent@microcks.io", "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: john@microcks.io | ||
age: 36 | ||
components: | ||
schemas: | ||
UserSignedupEvent: | ||
type: object | ||
allOf: | ||
- $ref: "./user-signedup.json" | ||
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 |
22 changes: 22 additions & 0 deletions
22
webapp/src/test/resources/io/github/microcks/util/asyncapi/user-signedup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "UserSignedupEvent Specification JSON Schema", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"fullName": { | ||
"type": "string" | ||
}, | ||
"email": { | ||
"type": "string", | ||
"format": "email" | ||
}, | ||
"age": { | ||
"type": "integer", | ||
"minimum": 18 | ||
} | ||
} | ||
} | ||
|
||
|
||
|