diff --git a/open_api/src/main/resources/api.yml b/open_api/src/main/resources/api.yml index b11ef7d..f0e62c9 100644 --- a/open_api/src/main/resources/api.yml +++ b/open_api/src/main/resources/api.yml @@ -105,6 +105,8 @@ paths: $ref: './schemas/chat_info/chat_info.yml#/PartyName' /api/site/chat/player/{uuid}/name: $ref: './schemas/chat_info/chat_info.yml#/UserName' + /api/site/chat/history: + $ref: './schemas/chat_info/chat_info.yml#/ChatHistory' /api/site/chat/send-message/{server}: $ref: './schemas/server-message/server-message.yml#/sendServerMessage' /api/site/chat/send-admin-chat/{server}: diff --git a/open_api/src/main/resources/schemas/chat_info/chat_info.yml b/open_api/src/main/resources/schemas/chat_info/chat_info.yml index 0589e6a..db0a551 100644 --- a/open_api/src/main/resources/schemas/chat_info/chat_info.yml +++ b/open_api/src/main/resources/schemas/chat_info/chat_info.yml @@ -44,8 +44,72 @@ PartyName: description: Invalid ID "404": description: Party not found +ChatHistory: + get: + tags: + - chatInfo + summary: Get chat messages in a range + operationId: getChatHistory + parameters: + - name: from + in: query + schema: + $ref: "#/components/schemas/DateTime" + - name: to + in: query + schema: + $ref: "#/components/schemas/DateTime" + responses: + "200": + description: Chat history + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/ChatMessage" components: schemas: + DateTime: + type: string + format: date-time + ChatMessage: + type: object + required: + - uuid + - message + - server + - type + - timestamp + - blocked + properties: + uuid: + type: string + format: uuid + message: + type: string + server: + type: string + type: + type: string + enum: + - PUBLIC + - GLOBAL + - PARTY + - GAC + - MSG + - CUSTOM + channel: + type: string + maxLength: 36 + receiver: + type: string + maxLength: 36 + timestamp: + type: string + format: date-time + blocked: + type: boolean PlayerName: type: object required: