Last change
on this file since 460 was 460, checked in by alloc, 15 months ago |
More OpenAPI specs added
OpenAPI specs cleanup to have everything validate fine
Added CORS support to API endpoints
|
File size:
1.9 KB
|
Line | |
---|
1 | openapi: 3.1.0
|
---|
2 | info:
|
---|
3 | title: Mods
|
---|
4 | version: '1'
|
---|
5 |
|
---|
6 | components:
|
---|
7 | schemas:
|
---|
8 | ModElement:
|
---|
9 | type: object
|
---|
10 | properties:
|
---|
11 | name:
|
---|
12 | type: string
|
---|
13 | examples:
|
---|
14 | - TFP_WebServer
|
---|
15 | displayName:
|
---|
16 | type: string
|
---|
17 | examples:
|
---|
18 | - Web Dashboard
|
---|
19 | description:
|
---|
20 | type: string
|
---|
21 | examples:
|
---|
22 | - Integrated Webserver for the Web Dashboard and server APIs
|
---|
23 | author:
|
---|
24 | type: string
|
---|
25 | examples:
|
---|
26 | - The Fun Pimps LLC
|
---|
27 | version:
|
---|
28 | type: string
|
---|
29 | examples:
|
---|
30 | - 21.1.15.0
|
---|
31 | website:
|
---|
32 | type: string
|
---|
33 | format: uri
|
---|
34 | examples:
|
---|
35 | - ''
|
---|
36 | web:
|
---|
37 | type: object
|
---|
38 | properties:
|
---|
39 | bundle:
|
---|
40 | type: string
|
---|
41 | examples:
|
---|
42 | - /webmods/Xample_MarkersMod/bundle.js
|
---|
43 | css:
|
---|
44 | type: string
|
---|
45 | examples:
|
---|
46 | - /webmods/Xample_MarkersMod/styling.css
|
---|
47 | required:
|
---|
48 | - name
|
---|
49 | - displayName
|
---|
50 | - description
|
---|
51 | - author
|
---|
52 | - version
|
---|
53 | - website
|
---|
54 |
|
---|
55 | ModsList:
|
---|
56 | type: array
|
---|
57 | items:
|
---|
58 | $ref: '#/components/schemas/ModElement'
|
---|
59 |
|
---|
60 |
|
---|
61 | paths:
|
---|
62 | /api/mods:
|
---|
63 | get:
|
---|
64 | tags:
|
---|
65 | - GameData
|
---|
66 | summary: Mods list
|
---|
67 | description: Fetch a list of loaded mods
|
---|
68 | operationId: mods.get
|
---|
69 | responses:
|
---|
70 | 200:
|
---|
71 | description: List of mods
|
---|
72 | content:
|
---|
73 | application/json:
|
---|
74 | schema:
|
---|
75 | type: object
|
---|
76 | properties:
|
---|
77 | data:
|
---|
78 | $ref: '#/components/schemas/ModsList'
|
---|
79 | meta:
|
---|
80 | $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
|
---|
81 | required:
|
---|
82 | - data
|
---|
83 | - meta
|
---|
Note:
See
TracBrowser
for help on using the repository browser.