source: TFP-WebServer/WebServer/src/WebAPI/APIs/WorldState/Animal.openapi.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: 1.4 KB
Line 
1openapi: 3.1.0
2info:
3 title: Animal
4 version: 1
5
6components:
7 schemas:
8 AnimalElement:
9 type: object
10 properties:
11 id:
12 $ref: '#/components/schemas/TypeEntityId'
13 name:
14 type: string
15 examples:
16 - animalStag
17 position:
18 $ref: '#/components/schemas/TypeVector3i'
19 required:
20 - id
21 - name
22 - position
23
24 AnimalList:
25 type: array
26 items:
27 $ref: '#/components/schemas/AnimalElement'
28
29
30paths:
31 /api/animal:
32 get:
33 tags:
34 - WorldState
35 summary: Animals list
36 description: Fetch a list of the currently spawned animals in the world
37 operationId: animal.get
38 responses:
39 200:
40 description: List of animals
41 content:
42 application/json:
43 schema:
44 type: object
45 properties:
46 data:
47 $ref: '#/components/schemas/AnimalList'
48 meta:
49 $ref: '#/components/schemas/ResultEnvelopeMeta'
50 required:
51 - data
52 - meta
53 403:
54 $ref: '#/components/responses/Unauthorized'
55 security:
56 - apiTokenName: []
57 apiTokenSecret: []
58 - sessionCookie: []
Note: See TracBrowser for help on using the repository browser.