github.com/vmware/transport-go@v1.3.4/plank/specs/asyncapi/plank-sample-services-asyncapi.yaml (about) 1 asyncapi: '2.1.0' 2 info: 3 title: Plank Sample Services 4 version: 1.0.0 5 description: | 6 Plank offers a selection of sample services to talk to, so you can get the hang of 7 how it works, and get an idea of what you can do. 8 contact: 9 name: VMware Transport Team 10 url: https://vmware.github.io/transport 11 license: 12 name: BSD-2-Clause 13 url: https://opensource.org/licenses/BSD-2-Clause 14 servers: 15 transport-bus: 16 url: wss://transport-bus.io/ws 17 protocol: stomp 18 tags: 19 - name: Stock-Ticker-Service 20 channels: 21 22 pub/queue/stock-ticker-service: 23 description: | 24 This channel is served by the 25 [stock ticker example](https://github.com/vmware/transport-go/blob/main/plank/services/stock-ticker-service.go) in plank. 26 You can send over a `StockSymbol` request here and listen for the response (using your UUID) over at queue/stock-ticker-service 27 publish: 28 operationId: ticker_price_update_stream 29 description: Publish your stock symbol lookup requests here, make sure you have subscribed first. 30 message: 31 $ref: '#/components/messages/StockSymbol' 32 33 34 queue/stock-ticker-service: 35 description: | 36 This channel is served by the 37 [stock ticker example](https://github.com/vmware/transport-go/blob/main/plank/services/stock-ticker-service.go) in plank. 38 Requests for stock lookup are delivered here. No inbound (publish) requests accepted here. 39 subscribe: 40 operationId: getStockSymbolResponse 41 description: Listen for stock request responses. Use your requesting `UUID` to listen for your specific response. 42 message: 43 $ref: '#/components/messages/StockSymbolResponse' 44 components: 45 schemas: 46 TransportMessage: 47 description: | 48 `TransportMessage` is a set of properties that always exist on any returning message from a request. 49 these properties are used by various other layers in the system to decide how to treat a transport message. 50 type: object 51 properties: 52 id: 53 description: | 54 `UUID` represented as a *string*. Should always be **unique** for every single message. 55 type: string 56 examples: 57 - d68695be-0f11-4c9c-8644-2667135a7baf 58 version: 59 description: | 60 Version of the message, default to '1' if you don't use this feature. 61 type: number 62 format: int32 63 examples: 64 - 1 65 created: 66 description: | 67 Timestamp representing when the message was created. 68 type: number 69 format: int64 70 examples: 71 - 1629991055269 72 request: 73 description: | 74 This is the command being issued to the service, this is the same as the `operationId` of the service. 75 type: string 76 examples: 77 - get-stock 78 - get-joke 79 - do-something 80 messages: 81 StockSymbol: 82 description: | 83 Representation of a company stock symbol that you want to look up. 84 payload: 85 allOf: 86 - $ref: '#/components/schemas/TransportMessage' 87 - type: object 88 properties: 89 payload: 90 type: object 91 description: | 92 The Stock Ticker service only needs to know the code of the stock you want to look up. 93 properties: 94 symbol: 95 description: Short-hand code use to represent the company stock in a market. 96 type: string 97 examples: 98 - VMW 99 - GOOG 100 - AAPL 101 StockSymbolResponse: 102 description: | 103 Response from a `StockSymbol` request published to pub/queue/stock-ticker-service 104 payload: 105 allOf: 106 - $ref: '#/components/schemas/TransportMessage' 107 - type: object 108 properties: 109 payload: 110 type: object 111 description: | 112 The result may not be realtime, the API we use in the backend is not great. 113 properties: 114 symbol: 115 description: Short-hand code use to represent the company stock in a market. 116 type: string 117 examples: 118 - VMW 119 - GOOG 120 - AAPL 121 lastRefreshed: 122 description: Timestamp pre-rendered as a string of when this value was last refreshed (last market close) 123 type: string 124 examples: 125 - "2021-08-25 18:45:00" 126 closePrice: 127 description: The value at which the stock price last closed on the open market. 128 type: number 129 format: float64 130 examples: 131 - 158.99