Skip to content

Instantly share code, notes, and snippets.

@adamw
Created October 23, 2020 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamw/bce0685c3b939759386bd55b038239d0 to your computer and use it in GitHub Desktop.
Save adamw/bce0685c3b939759386bd55b038239d0 to your computer and use it in GitHub Desktop.
asyncapi: 2.0.0
info:
title: JSON echo
version: '1.0'
servers:
dev:
url: localhost:8080
protocol: ws
channels:
/ping:
subscribe:
operationId: onPing
message:
$ref: '#/components/messages/Response'
publish:
operationId: sendPing
message:
$ref: '#/components/messages/string'
bindings:
ws:
method: GET
components:
schemas:
Response:
required:
- seqNo
- data
- valid
type: object
properties:
seqNo:
type: integer
data:
type: string
valid:
type: boolean
messages:
string:
payload:
type: string
contentType: text/plain
Response:
payload:
$ref: '#/components/schemas/Response'
contentType: application/json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment