source: TFP-WebServer/WebServer/src/WebAPI/OpenAPI.master.yaml@ 459

Last change on this file since 459 was 459, checked in by alloc, 15 months ago

Updated to dashboard/marker files 0.8.0
Added initial OpenAPI support

File size: 3.2 KB
Line 
1info:
2 title: 7 Days To Die WebAPI
3 version: 1.0.0
4openapi: 3.1.0
5servers:
6 - url: /
7
8components:
9 schemas:
10 ResultEnvelopeMeta:
11 type: object
12 properties:
13 serverTime:
14 type: string
15 format: date-time
16 requestMethod:
17 type: string
18 examples:
19 - GET
20 - POST
21 requestSubpath:
22 type: string
23 examples:
24 - search
25 description: >-
26 URL path (without query arguments) starting from after the API name,
27 excluding the initial slash '/'
28 requestBody:
29 type:
30 - object
31 - 'null'
32 examples:
33 - id: a
34 filter: 123
35 description: If erroneous request had a valid JSON body it is included here
36 errorCode:
37 type: string
38 examples:
39 - GET_WITH_BODY
40 - INVALID_COMMAND
41 description: Custom error identifier
42 exceptionMessage:
43 type: string
44 description: Message (If API execution threw an exception)
45 exceptionTrace:
46 type: string
47 description: Stack trace (If API execution threw an exception)
48 required:
49 - serverTime
50 - requestMethod
51 - requestSubpath
52 - requestBody
53 - errorCode
54
55 TypeEntityId:
56 type: integer
57 minimum: 0
58 examples:
59 - 171
60 description: World-unique EntityID
61
62 TypeVector3i:
63 type: object
64 properties:
65 x:
66 type: integer
67 examples:
68 - -123
69 y:
70 type: integer
71 examples:
72 - 61
73 z:
74 type: integer
75 examples:
76 - 734
77 required:
78 - x
79 - 'y'
80 - z
81 description: 3D vector in full blocks
82
83
84 responses:
85 HttpEmptyEnvelopedResponse:
86 description: Empty result
87 content:
88 application/json:
89 schema:
90 type: object
91 properties:
92 data:
93 type: array
94 items:
95 type: 'null'
96 maxItems: 0
97 examples:
98 - []
99 meta:
100 $ref: '#/components/schemas/ResultEnvelopeMeta'
101 required:
102 - data
103 - meta
104
105 Unauthorized:
106 description: Not authorized to call this operation
107
108
109 securitySchemes:
110 apiTokenName:
111 type: apiKey
112 in: header
113 name: X-SDTD-API-TOKENNAME
114 description: Authentication by a "WebToken" with token name and token secret, passed in as header fields. This specifies the token name.
115 apiTokenSecret:
116 type: apiKey
117 in: header
118 name: X-SDTD-API-SECRET
119 description: Authentication by a "WebToken" with token name and token secret, passed in as header fields. This specifies the token secret.
120 sessionCookie:
121 type: apiKey
122 in: cookie
123 name: sid
124 description: Authentication by session cookie. A cookie can be received from the session endpoints.
125
126
127paths:
128 allOf:
Note: See TracBrowser for help on using the repository browser.