Last active
January 25, 2023 22:24
-
-
Save robece/0ce1fb7e0eccc903be3b35cd263faeaa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
asyncapi: 2.5.0 | |
info: | |
title: Age of Empires App | |
version: 1.0.0 | |
description: > | |
Purpose of this app is to have some fun with AsyncAPI and WebSocket and | |
define an interface for Age of Empires. | |
 | |
You can use this API to chat with the Age of Empires bot or to get updates about | |
the game. | |
servers: | |
swamp: | |
url: localhost | |
protocol: ws | |
channels: | |
/chat: | |
subscribe: | |
summary: Client can receive chat messages. | |
operationId: subChatMessage | |
message: | |
$ref: '#/components/messages/chatMessage' | |
publish: | |
summary: Client can send chat messages. | |
operationId: pubChatMessage | |
message: | |
$ref: '#/components/messages/chatMessage' | |
/game/status: | |
subscribe: | |
summary: Client can receive game info status. | |
operationId: subGameInfo | |
message: | |
$ref: '#/components/messages/gameInfo' | |
components: | |
messages: | |
chatMessage: | |
summary: Message that you send or receive from chat | |
payload: | |
type: string | |
gameInfo: | |
summary: Message that contains information about game status. | |
examples: | |
- payload: | |
battle: Greeks vs Persians | |
winning: Greeks | |
nextBattle: Romans vs Yamato | |
payload: | |
type: object | |
properties: | |
battle: | |
description: Who is in battle?. | |
type: string | |
winning: | |
description: Who is winning the battle. | |
type: string | |
nextBattle: | |
description: Who are the next players. | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment