Add ChatInfoService for retrieving player and party names: integrated backend APIs, updated chat service with caching logic for names, and extended OpenAPI documentation.
This commit is contained in:
@@ -30,6 +30,8 @@ tags:
|
||||
description: All actions related to user email verification
|
||||
- name: site
|
||||
description: Actions related to small features on the site such as displaying vote stats or pt/rank stats
|
||||
- name: chatInfo
|
||||
description: All actions related to chat information
|
||||
paths:
|
||||
/api/team/{team}:
|
||||
$ref: './schemas/team/team.yml#/getTeam'
|
||||
@@ -97,3 +99,7 @@ paths:
|
||||
$ref: './schemas/site/vote.yml#/VoteStats'
|
||||
/api/site/get-staff-playtime/{from}/{to}:
|
||||
$ref: './schemas/site/staff_pt.yml#/GetStaffPlaytime'
|
||||
/api/site/chat/party/{id}/name:
|
||||
$ref: './schemas/chat_info/chat_info.yml#/PartyName'
|
||||
/api/site/chat/player/{uuid}/name:
|
||||
$ref: './schemas/chat_info/chat_info.yml#/UserName'
|
||||
|
||||
@@ -45,64 +45,8 @@ paths:
|
||||
responses:
|
||||
"202":
|
||||
description: Accepted
|
||||
|
||||
/chat/player/{uuid}/name:
|
||||
get:
|
||||
tags:
|
||||
- chat
|
||||
summary: Gets the name, and nickname of the player associated with that uuid
|
||||
operationId: getName
|
||||
parameters:
|
||||
- name: uuid
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
"200":
|
||||
description: The player's name and nickname
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PlayerName"
|
||||
"404":
|
||||
description: Player not found
|
||||
|
||||
/chat/party/{id}/name:
|
||||
get:
|
||||
tags:
|
||||
- chat
|
||||
summary: Gets the name, of the party based on the id
|
||||
operationId: getPartyName
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The party name
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
"400":
|
||||
description: Invalid ID
|
||||
"404":
|
||||
description: Party not found
|
||||
components:
|
||||
schemas:
|
||||
PlayerName:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
nickname:
|
||||
type: string
|
||||
User:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
UserName:
|
||||
get:
|
||||
tags:
|
||||
- chatInfo
|
||||
summary: Gets the name, and nickname of the player associated with that uuid
|
||||
operationId: getName
|
||||
parameters:
|
||||
- name: uuid
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
"200":
|
||||
description: The player's name and nickname
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/PlayerName"
|
||||
"404":
|
||||
description: Player not found
|
||||
|
||||
PartyName:
|
||||
get:
|
||||
tags:
|
||||
- chatInfo
|
||||
summary: Gets the name, of the party based on the id
|
||||
operationId: getPartyName
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: The party name
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: string
|
||||
"400":
|
||||
description: Invalid ID
|
||||
"404":
|
||||
description: Party not found
|
||||
components:
|
||||
schemas:
|
||||
PlayerName:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
nickname:
|
||||
type: string
|
||||
Reference in New Issue
Block a user