source: TFP-WebServer/WebServer/src/WebAPI/APIs/ServerState/GamePrefs.openapi.yaml@ 479

Last change on this file since 479 was 463, checked in by alloc, 2 years 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: 3.1 KB
Line 
1openapi: 3.1.0
2info:
3 title: GamePrefs
4 version: '1'
5
6components:
7 schemas:
8 GamePrefElementInt:
9 type: object
10 properties:
11 name:
12 type: string
13 examples:
14 - WebDashboardPort
15 type:
16 type: string
17 const: 'int'
18 value:
19 type: integer
20 examples:
21 - 8000
22 default:
23 type: integer
24 examples:
25 - 8080
26 required:
27 - name
28 - type
29 - value
30 - default
31
32 GamePrefElementFloat:
33 type: object
34 properties:
35 name:
36 type: string
37 examples:
38 - SaveDataLimit
39 type:
40 type: string
41 const: 'float'
42 value:
43 type: number
44 format: float
45 examples:
46 - 150
47 default:
48 type: number
49 format: float
50 examples:
51 - -1
52 required:
53 - name
54 - type
55 - value
56 - default
57
58 GamePrefElementBool:
59 type: object
60 properties:
61 name:
62 type: string
63 examples:
64 - EnableMapRendering
65 type:
66 type: string
67 const: 'bool'
68 value:
69 type: boolean
70 examples:
71 - true
72 default:
73 type: boolean
74 examples:
75 - false
76 required:
77 - name
78 - type
79 - value
80 - default
81
82 GamePrefElementString:
83 type: object
84 properties:
85 name:
86 type: string
87 examples:
88 - GameWorld
89 type:
90 type: string
91 const: 'string'
92 value:
93 type: string
94 examples:
95 - Navezgane
96 default:
97 type: string
98 examples:
99 - ''
100 required:
101 - name
102 - type
103 - value
104 - default
105
106 GamePrefList:
107 type: array
108 items:
109 anyOf:
110 - $ref: '#/components/schemas/GamePrefElementInt'
111 - $ref: '#/components/schemas/GamePrefElementFloat'
112 - $ref: '#/components/schemas/GamePrefElementBool'
113 - $ref: '#/components/schemas/GamePrefElementString'
114
115
116paths:
117 /api/gameprefs:
118 get:
119 tags:
120 - ServerState
121 summary: GamePrefs list
122 description: Fetch a list of GamePrefs
123 operationId: GamePrefs.get
124 responses:
125 200:
126 description: List of GamePrefs
127 content:
128 application/json:
129 schema:
130 type: object
131 properties:
132 data:
133 $ref: '#/components/schemas/GamePrefList'
134 meta:
135 $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
136 required:
137 - data
138 - meta
139 403:
140 $ref: './openapi.yaml#/components/responses/Unauthorized'
141 security:
142 - apiTokenName: [ ]
143 apiTokenSecret: [ ]
144 - sessionCookie: [ ]
Note: See TracBrowser for help on using the repository browser.