openapi: maps endpoints

This commit is contained in:
Quaternions 2025-04-01 16:45:55 -07:00
parent 3bda4803aa
commit 082c573ffb
Signed by: Quaternions
GPG Key ID: D0DF5964F79AC131

@ -8,8 +8,10 @@ servers:
tags:
- name: Mapfixes
description: Mapfix operations
- name: Maps
description: Map queries
- name: Session
description: Session operations
description: Session queries
- name: Submissions
description: Submission operations
- name: Scripts
@ -76,6 +78,73 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"
/maps:
get:
summary: Get list of maps
operationId: listMaps
tags:
- Maps
security: []
parameters:
- $ref: "#/components/parameters/Page"
- $ref: "#/components/parameters/Limit"
- name: DisplayName
in: query
schema:
type: string
maxLength: 128
- name: Creator
in: query
schema:
type: string
maxLength: 128
- name: GameID
in: query
schema:
type: integer
format: int32
- name: Sort
in: query
schema:
type: integer
format: int32
responses:
"200":
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Map"
default:
description: General Error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/maps/{MapID}:
get:
summary: Retrieve map with ID
operationId: getMap
tags:
- Maps
security: []
parameters:
- $ref: '#/components/parameters/MapID'
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Map"
default:
description: General Error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/mapfixes:
get:
summary: Get list of mapfixes
@ -948,6 +1017,14 @@ components:
in: cookie
name: session_id
parameters:
MapID:
name: MapID
in: path
required: true
description: The unique identifier for a map.
schema:
type: integer
format: int64
MapfixID:
name: MapfixID
in: path
@ -1030,6 +1107,30 @@ components:
AvatarURL:
type: string
maxLength: 256
Map:
required:
- ID
- DisplayName
- Creator
- GameID
- Date
type: object
properties:
ID:
type: integer
format: int64
DisplayName:
type: string
maxLength: 128
Creator:
type: string
maxLength: 128
GameID:
type: integer
format: int32
Date:
type: integer
format: int64
Mapfix:
required:
- ID