Skip to content

Commit fe65028

Browse files
committed
Use minified endpoints, add full pmapis endpoint, add required to more models, split CategoryName into Category and CategoryName enum
1 parent 9e05095 commit fe65028

File tree

10 files changed

+1482
-507
lines changed

10 files changed

+1482
-507
lines changed

poggit-api-specification.yml

Lines changed: 74 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ servers:
66
- url: https://poggit.pmmp.io
77
description: Poggit API
88
paths:
9-
/pmapis:
9+
/pmapis.min:
1010
get:
1111
summary: Retrieve a list of pocketmine API versions
1212
operationId: getApiVersions
@@ -19,7 +19,18 @@ paths:
1919
type: object
2020
additionalProperties:
2121
$ref: '#/components/schemas/ApiVersion'
22-
/releases.list:
22+
/pmapis.full.min:
23+
get:
24+
summary: Retrieve a list of pocketmine API versions
25+
operationId: getApiVersionsFull
26+
responses:
27+
"200":
28+
description: Ok
29+
content:
30+
application/json:
31+
schema:
32+
$ref: '#/components/schemas/ApiVersionsOverview'
33+
/releases.min.json:
2334
get:
2435
summary: Retrieve a plugin list
2536
description: You may retrieve a list of voted/approved plugins using this endpoint (along with some aliases which are functionally identical)
@@ -285,6 +296,31 @@ paths:
285296
type: string
286297
components:
287298
schemas:
299+
ApiVersionsOverview:
300+
type: object
301+
properties:
302+
promoted:
303+
type: string
304+
example: "5.27.1"
305+
promotedCompat:
306+
type: string
307+
example: "5.0.0"
308+
latest:
309+
type: string
310+
example: "5.27.1"
311+
latestCompat:
312+
type: string
313+
example: "5.0.0"
314+
versions:
315+
type: object
316+
additionalProperties:
317+
$ref: '#/components/schemas/ApiVersion'
318+
required:
319+
- promoted
320+
- promotedCompat
321+
- latest
322+
- latestCompat
323+
- versions
288324
ApiVersion:
289325
type: object
290326
properties:
@@ -312,13 +348,23 @@ components:
312348
type: boolean
313349
phar:
314350
$ref: '#/components/schemas/PharList'
351+
required:
352+
- id
353+
- description
354+
- php
355+
- incompatible
356+
- indev
357+
- supported
358+
- phar
315359
PharList:
316360
description: This is an object, where the default attribute is a link to a PocketMine-MP.phar of that API version. More links may be added in the future.
317361
type: object
318362
properties:
319363
default:
320364
type: string
321365
nullable: true
366+
required:
367+
- default
322368
Release:
323369
type: object
324370
properties:
@@ -388,7 +434,7 @@ components:
388434
categories:
389435
type: array
390436
items:
391-
$ref: '#/components/schemas/CategoryName'
437+
$ref: '#/components/schemas/Category'
392438
keywords:
393439
type: array
394440
items:
@@ -452,31 +498,36 @@ components:
452498
- deps
453499
- producers
454500
- state_name
455-
CategoryName:
501+
Category:
456502
type: object
457503
properties:
458504
major:
459505
type: boolean
460506
category_name:
461-
type: string
462-
enum:
463-
- General
464-
- Admin Tools
465-
- Informational
466-
- Anti-Griefing Tools
467-
- Chat-Related
468-
- Teleportation
469-
- Mechanics
470-
- Economy
471-
- Minigame
472-
- Fun
473-
- World Editing and Management
474-
- World Generators
475-
- Developer Tools
476-
- Educational
477-
- Miscellaneous
478-
- API plugins
479-
- Vanilla Mechanics
507+
$ref: '#/components/schemas/CategoryName'
508+
required:
509+
- major
510+
- category_name
511+
CategoryName:
512+
type: string
513+
enum:
514+
- General
515+
- Admin Tools
516+
- Informational
517+
- Anti-Griefing Tools
518+
- Chat-Related
519+
- Teleportation
520+
- Mechanics
521+
- Economy
522+
- Minigame
523+
- Fun
524+
- World Editing and Management
525+
- World Generators
526+
- Developer Tools
527+
- Educational
528+
- Miscellaneous
529+
- API plugins
530+
- Vanilla Mechanics
480531
Dependency:
481532
type: object
482533
properties:

0 commit comments

Comments
 (0)