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.5 KB
|
Line | |
---|
1 | openapi: 3.1.0
|
---|
2 | info:
|
---|
3 | title: ServerInfo
|
---|
4 | version: '1'
|
---|
5 |
|
---|
6 | components:
|
---|
7 | schemas:
|
---|
8 | ServerInfoElementInt:
|
---|
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 | ServerInfoElementFloat:
|
---|
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 | ServerInfoElementBool:
|
---|
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 | ServerInfoElementString:
|
---|
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 | ServerInfoList:
|
---|
86 | type: array
|
---|
87 | items:
|
---|
88 | anyOf:
|
---|
89 | - $ref: '#/components/schemas/ServerInfoElementInt'
|
---|
90 | - $ref: '#/components/schemas/ServerInfoElementFloat'
|
---|
91 | - $ref: '#/components/schemas/ServerInfoElementBool'
|
---|
92 | - $ref: '#/components/schemas/ServerInfoElementString'
|
---|
93 |
|
---|
94 |
|
---|
95 | paths:
|
---|
96 | /api/serverinfo:
|
---|
97 | get:
|
---|
98 | tags:
|
---|
99 | - ServerState
|
---|
100 | summary: ServerInfo
|
---|
101 | description: Fetch the ServerInfo
|
---|
102 | operationId: ServerInfo.get
|
---|
103 | responses:
|
---|
104 | 200:
|
---|
105 | description: List of ServerInfo data
|
---|
106 | content:
|
---|
107 | application/json:
|
---|
108 | schema:
|
---|
109 | type: object
|
---|
110 | properties:
|
---|
111 | data:
|
---|
112 | $ref: '#/components/schemas/ServerInfoList'
|
---|
113 | meta:
|
---|
114 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
115 | required:
|
---|
116 | - data
|
---|
117 | - meta
|
---|
Note:
See
TracBrowser
for help on using the repository browser.