source: TFP-WebServer/WebServer/src/WebAPI/APIs/ServerState/ServerStats.openapi.yaml@ 474

Last change on this file since 474 was 463, checked in by alloc, 16 months ago

21.1.16.0 release
Completed OpenAPI specs
Add support to path handlers to register OpenAPI specs
Fixed ItemIconHandler throwing error when requested path contains no dot

File size: 1.3 KB
Line 
1openapi: 3.1.0
2info:
3 title: ServerStats
4 version: '1'
5
6components:
7 schemas:
8 ServerStatsObject:
9 type: object
10 properties:
11 gameTime:
12 $ref: './openapi.yaml#/components/schemas/TypeGameTimeObject'
13 description: Current in-game time
14 players:
15 type: integer
16 description: Currently logged in players
17 hostiles:
18 type: integer
19 description: Currently active hostiles, including hostile animals
20 animals:
21 type: integer
22 description: Currently active (non-hostile) animals
23 required:
24 - gameTime
25 - players
26 - hostiles
27 - animals
28
29
30paths:
31 /api/serverstats:
32 get:
33 tags:
34 - ServerState
35 summary: ServerStats
36 description: Fetch the current server stats
37 operationId: ServerStats.get
38 responses:
39 200:
40 description: Server stats
41 content:
42 application/json:
43 schema:
44 type: object
45 properties:
46 data:
47 $ref: '#/components/schemas/ServerStatsObject'
48 meta:
49 $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
50 required:
51 - data
52 - meta
Note: See TracBrowser for help on using the repository browser.