openapi changes

This commit is contained in:
Quaternions 2024-11-25 20:45:06 -08:00
parent 4e15e642ce
commit 51a2ee81bc

View File

@ -1,4 +1,4 @@
openapi: 3.0.0 openapi: 3.1.0
info: info:
title: StrafesNET Maps - OpenAPI 3.0 title: StrafesNET Maps - OpenAPI 3.0
description: Browse and manage maps. description: Browse and manage maps.
@ -6,17 +6,15 @@ info:
servers: servers:
- url: https://maps.strafes.net/v1 - url: https://maps.strafes.net/v1
tags: tags:
- name: Times - name: Maps
description: Retrieve player times description: Map operations
- name: User
description: User operations
paths: paths:
/times: /maps:
get: get:
summary: Get list of times summary: Get list of maps
operationId: listTimes operationId: listMaps
tags: tags:
- Times - Maps
parameters: parameters:
- name: page - name: page
in: query in: query
@ -27,7 +25,7 @@ paths:
in: query in: query
required: false required: false
schema: schema:
$ref: "#/components/schemas/TimeFilter" $ref: "#/components/schemas/MapFilter"
responses: responses:
"200": "200":
description: Successful response description: Successful response
@ -36,21 +34,21 @@ paths:
schema: schema:
type: array type: array
items: items:
$ref: "#/components/schemas/Time" $ref: "#/components/schemas/Map"
default: default:
description: General Error description: General Error
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/users/{UserID}: /maps/{MapID}:
get: get:
summary: Retrieve user with ID summary: Retrieve map with ID
operationId: getUser operationId: getMap
tags: tags:
- User - Maps
parameters: parameters:
- name: UserID - name: MapID
in: path in: path
required: true required: true
schema: schema:
@ -62,51 +60,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/User" $ref: "#/components/schemas/Map"
default:
description: General Error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/users/{UserID}/rank:
get:
summary: Retrieve rank of user
operationId: getUserRank
tags:
- User
parameters:
- name: UserID
in: path
required: true
schema:
type: integer
format: int64
- name: StyleID
in: query
required: true
schema:
type: integer
format: int32
- name: GameID
in: query
required: true
schema:
type: integer
format: int32
- name: ModeID
in: query
required: true
schema:
type: integer
format: int32
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Rank"
default: default:
description: General Error description: General Error
content: content:
@ -142,96 +96,22 @@ components:
Date: Date:
type: integer type: integer
format: int64 format: int64
Time: MapFilter:
type: object type: object
properties: properties:
ID: ID:
type: integer type: integer
format: int64 format: int64
Time: DisplayName:
type: string
Creator:
type: string
GameID:
type: integer type: integer
format: int64 format: int32
User:
$ref: "#/components/schemas/User"
Map:
$ref: "#/components/schemas/Map"
Date: Date:
type: integer type: integer
format: int64 format: int64
StyleID:
type: integer
format: int32
ModeID:
type: integer
format: int32
GameID:
type: integer
format: int32
TimeFilter:
type: object
properties:
ID:
type: integer
format: int64
Time:
type: integer
format: int64
UserID:
type: integer
format: int64
MapID:
type: integer
format: int64
StyleID:
type: integer
format: int32
ModeID:
type: integer
format: int32
GameID:
type: integer
format: int32
Rank:
type: object
properties:
ID:
type: integer
format: int64
User:
$ref: "#/components/schemas/User"
StyleID:
type: integer
format: int32
ModeID:
type: integer
format: int32
GameID:
type: integer
format: int32
Rank:
type: number
format: double
Skill:
type: number
format: double
UpdatedAt:
type: integer
format: int64
RankFilter:
type: object
properties:
StyleID:
type: integer
format: int32
GameID:
type: integer
format: int32
ModeID:
type: integer
format: int32
Sort:
type: integer
format: int64
Pagination: Pagination:
type: object type: object
required: required: