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:
2.7 KB
|
Line | |
---|
1 | openapi: 3.1.0
|
---|
2 | info:
|
---|
3 | title: GameStats
|
---|
4 | version: '1'
|
---|
5 |
|
---|
6 | components:
|
---|
7 | schemas:
|
---|
8 | GameStatElementInt:
|
---|
9 | type: object
|
---|
10 | properties:
|
---|
11 | name:
|
---|
12 | type: string
|
---|
13 | examples:
|
---|
14 | - TimeOfDayIncPerSec
|
---|
15 | type:
|
---|
16 | type: string
|
---|
17 | const: 'int'
|
---|
18 | value:
|
---|
19 | type: integer
|
---|
20 | examples:
|
---|
21 | - 6
|
---|
22 | required:
|
---|
23 | - name
|
---|
24 | - type
|
---|
25 | - value
|
---|
26 |
|
---|
27 | GameStatElementFloat:
|
---|
28 | type: object
|
---|
29 | properties:
|
---|
30 | name:
|
---|
31 | type: string
|
---|
32 | examples:
|
---|
33 | - GameDifficultyBonus
|
---|
34 | type:
|
---|
35 | type: string
|
---|
36 | const: 'float'
|
---|
37 | value:
|
---|
38 | type: number
|
---|
39 | format: float
|
---|
40 | examples:
|
---|
41 | - 1
|
---|
42 | required:
|
---|
43 | - name
|
---|
44 | - type
|
---|
45 | - value
|
---|
46 |
|
---|
47 | GameStatElementBool:
|
---|
48 | type: object
|
---|
49 | properties:
|
---|
50 | name:
|
---|
51 | type: string
|
---|
52 | examples:
|
---|
53 | - IsSpawnEnemies
|
---|
54 | type:
|
---|
55 | type: string
|
---|
56 | const: 'bool'
|
---|
57 | value:
|
---|
58 | type: boolean
|
---|
59 | examples:
|
---|
60 | - true
|
---|
61 | required:
|
---|
62 | - name
|
---|
63 | - type
|
---|
64 | - value
|
---|
65 |
|
---|
66 | GameStatElementString:
|
---|
67 | type: object
|
---|
68 | properties:
|
---|
69 | name:
|
---|
70 | type: string
|
---|
71 | examples:
|
---|
72 | - GameWorld
|
---|
73 | type:
|
---|
74 | type: string
|
---|
75 | const: 'string'
|
---|
76 | value:
|
---|
77 | type: string
|
---|
78 | examples:
|
---|
79 | - Navezgane
|
---|
80 | required:
|
---|
81 | - name
|
---|
82 | - type
|
---|
83 | - value
|
---|
84 |
|
---|
85 | GameStatList:
|
---|
86 | type: array
|
---|
87 | items:
|
---|
88 | anyOf:
|
---|
89 | - $ref: '#/components/schemas/GameStatElementInt'
|
---|
90 | - $ref: '#/components/schemas/GameStatElementFloat'
|
---|
91 | - $ref: '#/components/schemas/GameStatElementBool'
|
---|
92 | - $ref: '#/components/schemas/GameStatElementString'
|
---|
93 |
|
---|
94 |
|
---|
95 | paths:
|
---|
96 | /api/gamestats:
|
---|
97 | get:
|
---|
98 | tags:
|
---|
99 | - ServerState
|
---|
100 | summary: GameStats list
|
---|
101 | description: Fetch a list of GameStats
|
---|
102 | operationId: GameStats.get
|
---|
103 | responses:
|
---|
104 | 200:
|
---|
105 | description: List of GameStats
|
---|
106 | content:
|
---|
107 | application/json:
|
---|
108 | schema:
|
---|
109 | type: object
|
---|
110 | properties:
|
---|
111 | data:
|
---|
112 | $ref: '#/components/schemas/GameStatList'
|
---|
113 | meta:
|
---|
114 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
115 | required:
|
---|
116 | - data
|
---|
117 | - meta
|
---|
118 | 403:
|
---|
119 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
120 | security:
|
---|
121 | - apiTokenName: [ ]
|
---|
122 | apiTokenSecret: [ ]
|
---|
123 | - sessionCookie: [ ]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.