source: TFP-WebServer/WebServer/src/WebAPI/APIs/GameData/Mods.openapi.yaml@ 474

Last change on this file since 474 was 467, checked in by alloc, 16 months ago

21.1.16.2 WebServer release
Added "id"s to messages in log API / event
Added "baseUrl" to mods API for WebMods

File size: 2.3 KB
RevLine 
[460]1openapi: 3.1.0
2info:
3 title: Mods
4 version: '1'
5
6components:
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:
[467]39 baseUrl:
40 type: string
41 examples:
42 - /webmods/TFP_MarkersExample/
43 description: Base URL of the WebMod folder of this mod. Always ends with a forward slash '/'.
[460]44 bundle:
45 type: string
46 examples:
[467]47 - /webmods/TFP_MarkersExample/bundle.js
48 description: URL of the React bundle if the mod has one.
[460]49 css:
50 type: string
51 examples:
[467]52 - /webmods/TFP_MarkersExample/styling.css
53 description: URL of a styling CSS file if the mod has one.
54 required:
55 - baseUrl
[460]56 required:
57 - name
58 - displayName
59 - description
60 - author
61 - version
62 - website
63
64 ModsList:
65 type: array
66 items:
67 $ref: '#/components/schemas/ModElement'
68
69
70paths:
71 /api/mods:
72 get:
73 tags:
74 - GameData
75 summary: Mods list
76 description: Fetch a list of loaded mods
77 operationId: mods.get
78 responses:
79 200:
80 description: List of mods
81 content:
82 application/json:
83 schema:
84 type: object
85 properties:
86 data:
87 $ref: '#/components/schemas/ModsList'
88 meta:
89 $ref: './openapi.yaml#/components/schemas/ResultEnvelopeMeta'
90 required:
91 - data
92 - meta
Note: See TracBrowser for help on using the repository browser.