-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yml
224 lines (217 loc) · 6.49 KB
/
swagger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
openapi: 3.0.0
info:
description: |
This is the documentation page for the unofficial [Arma REST API](https://github.com/M-Davies/arma-api). Please see the examples below on how to use this application.
version: "1.0.0"
title: Arma API
contact:
email: [email protected]
license:
name: GNU General Public License v3.0
url: 'https://github.com/M-Davies/arma-api/blob/master/LICENSE'
servers:
- description: Production heroku server
url: https://unofficial-arma-api.herokuapp.com
# Added by API Auto Mocking Plugin
- description: SwaggerHub API Auto Mocking
url: https://virtserver.swaggerhub.com/M_Davies/arma-api/1.0.0
tags:
- name: classes
externalDocs:
description: More about configs
url: 'https://community.bistudio.com/wiki/Arma_3:_Characters_And_Gear_Encoding_Guide'
paths:
/classes/:
get:
tags:
- classes
summary: Retrieves all config class objects
operationId: allClasses
parameters:
- $ref: '#/components/parameters/type'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/size'
responses:
'200':
description: Successful request, returns jsonarray of matching classes
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessfulApiResponse'
'404':
description: Invalid parameters or error occured
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorApiResponse'
/classes/{mod}:
get:
tags:
- classes
summary: Retrieves all config class objects filtered by the mod
operationId: allClassesByMod
parameters:
- $ref: '#/components/parameters/mod'
- $ref: '#/components/parameters/type'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/size'
responses:
'200':
description: Successful request, returns jsonarray of matching classes
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessfulApiResponse'
'404':
description: Invalid parameters or error occured
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorApiResponse'
/classes/search/{term}:
get:
tags:
- classes
summary: Find classes by search term
operationId: allClassesByTerm
parameters:
- name: term
in: path
description: Search term
required: true
schema:
type: string
example: "ak47"
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/size'
responses:
'200':
description: Successful operation, returns jsonarray of matching classes
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessfulApiResponse'
'404':
description: Invalid search term or server error occured
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorApiResponse'
components:
schemas:
Config:
type: object
required:
- class
- name
- _id
properties:
_id:
type: string
description: Unique Object ID
example: "507f191e810c19729de860ea"
class:
type: string
description: Class name
example: "rhs_AK74_GL_Name"
name:
type: string
description: Display name
example: "AK74 GL"
image:
type: string
description: Relative path to display image
example: "a3/location/ak74_gl.paa"
magazines:
type: array
description: Accepted magazine classes
example: ["3CB_AK47_30rnd_ammo", "3CB_AK74_30rnd_ammo"]
items:
type: string
magwell:
type: array
description: Accepted magazines in well
example: ["AK", "VOG25"]
items:
type: string
type:
type: string
description: Config type
example: "Primaries"
subtype:
type: string
description: Item subtype based on [BIS_fnc_itemType](https://community.bistudio.com/wiki/BIS_fnc_itemType)
example: "MissileLauncher"
mod:
type: string
description: Config mod owner
example: "RedHammerStudios"
weight:
type: integer
description: Weight of item (kg)
example: 10
ammo:
type: string
description: Accepted ammo class
example: "rhs_7.62_x51mm_round"
count:
type: integer
description: Size of magazine
example: 30
xml:
name: Config
SuccessfulApiResponse:
type: array
items:
$ref: '#/components/schemas/Config'
ErrorApiResponse:
type: object
properties:
status:
type: integer
example: 404
timestamp:
type: string
example: "2007-12-03T10:15:30"
error:
type: string
example: "Unidentified mod. Available values are [ace, vanilla]"
parameters:
mod:
name: mod
in: path
description: Mod to filter the results by
required: true
schema:
type: string
enum: ["vanilla","ace","3cb","rhs","niarms","tacvests","tryk","vsm","rksl","acre","projectopfor","immersioncigs"]
type:
name: type
in: query
description: Type to filter the results by
required: false
schema:
type: string
enum: ["Primaries", "Secondaries", "Launchers", "Throwables", "Explosives", "Muzzles",
"Pointers", "Optics", "Bipods", "Tools", "Terminals", "Maps", "GPSs", "Radios",
"Compasses", "Watches", "Facewear", "Headgear", "Goggles", "Binoculars",
"Magazines", "Uniforms", "Vests", "Backpacks"
]
page:
name: page
in: query
description: Pagination page number
required: false
schema:
type: integer
default: 0
example: 0
size:
name: size
in: query
description: Pagination maximum page size, -1 means that there is no size limit
required: false
schema:
type: integer
default: -1
example: -1