Last change
on this file since 463 was 463, checked in by alloc, 15 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:
1.4 KB
|
Rev | Line | |
---|
[459] | 1 | openapi: 3.1.0
|
---|
| 2 | info:
|
---|
| 3 | title: Animal
|
---|
[460] | 4 | version: '1'
|
---|
[459] | 5 |
|
---|
| 6 | components:
|
---|
| 7 | schemas:
|
---|
| 8 | AnimalElement:
|
---|
| 9 | type: object
|
---|
| 10 | properties:
|
---|
| 11 | id:
|
---|
[460] | 12 | $ref: './openapi.yaml#/components/schemas/TypeEntityId'
|
---|
[459] | 13 | name:
|
---|
| 14 | type: string
|
---|
| 15 | examples:
|
---|
| 16 | - animalStag
|
---|
| 17 | position:
|
---|
[460] | 18 | $ref: './openapi.yaml#/components/schemas/TypeVector3i'
|
---|
[459] | 19 | required:
|
---|
| 20 | - id
|
---|
| 21 | - name
|
---|
| 22 | - position
|
---|
| 23 |
|
---|
| 24 | AnimalList:
|
---|
| 25 | type: array
|
---|
| 26 | items:
|
---|
| 27 | $ref: '#/components/schemas/AnimalElement'
|
---|
| 28 |
|
---|
| 29 |
|
---|
| 30 | paths:
|
---|
| 31 | /api/animal:
|
---|
| 32 | get:
|
---|
| 33 | tags:
|
---|
| 34 | - WorldState
|
---|
| 35 | summary: Animals list
|
---|
[463] | 36 | description: Fetch a list of the currently spawned (non-hostile) animals in the world
|
---|
[459] | 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:
|
---|
[460] | 49 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
[459] | 50 | required:
|
---|
| 51 | - data
|
---|
| 52 | - meta
|
---|
| 53 | 403:
|
---|
[460] | 54 | $ref: './openapi.yaml#/components/responses/Unauthorized'
|
---|
[459] | 55 | security:
|
---|
| 56 | - apiTokenName: []
|
---|
| 57 | apiTokenSecret: []
|
---|
| 58 | - sessionCookie: []
|
---|
Note:
See
TracBrowser
for help on using the repository browser.