142 lines
3.0 KiB
YAML
142 lines
3.0 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: StrafesNET Maps - OpenAPI 3.0
|
|
description: Browse and manage maps.
|
|
version: 0.1.0
|
|
servers:
|
|
- url: https://maps.strafes.net/v1
|
|
tags:
|
|
- name: Maps
|
|
description: Map operations
|
|
paths:
|
|
/maps:
|
|
get:
|
|
summary: Get list of maps
|
|
operationId: listMaps
|
|
tags:
|
|
- Maps
|
|
parameters:
|
|
- name: page
|
|
in: query
|
|
required: true
|
|
schema:
|
|
$ref: "#/components/schemas/Pagination"
|
|
- name: filter
|
|
in: query
|
|
required: false
|
|
schema:
|
|
$ref: "#/components/schemas/MapFilter"
|
|
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
|
|
parameters:
|
|
- name: MapID
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
format: int64
|
|
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"
|
|
components:
|
|
schemas:
|
|
User:
|
|
type: object
|
|
properties:
|
|
ID:
|
|
type: integer
|
|
format: int64
|
|
Username:
|
|
type: string
|
|
StateID:
|
|
type: integer
|
|
format: int32
|
|
Map:
|
|
type: object
|
|
properties:
|
|
ID:
|
|
type: integer
|
|
format: int64
|
|
DisplayName:
|
|
type: string
|
|
Creator:
|
|
type: string
|
|
GameID:
|
|
type: integer
|
|
format: int32
|
|
Date:
|
|
type: integer
|
|
format: int64
|
|
MapFilter:
|
|
type: object
|
|
properties:
|
|
ID:
|
|
type: integer
|
|
format: int64
|
|
DisplayName:
|
|
type: string
|
|
Creator:
|
|
type: string
|
|
GameID:
|
|
type: integer
|
|
format: int32
|
|
Date:
|
|
type: integer
|
|
format: int64
|
|
Pagination:
|
|
type: object
|
|
required:
|
|
- Page
|
|
- Limit
|
|
properties:
|
|
Page:
|
|
type: integer
|
|
format: int32
|
|
minimum: 1
|
|
Limit:
|
|
type: integer
|
|
format: int32
|
|
minimum: 1
|
|
maximum: 100
|
|
Error:
|
|
description: Represents error object
|
|
type: object
|
|
properties:
|
|
code:
|
|
type: integer
|
|
format: int64
|
|
message:
|
|
type: string
|
|
required:
|
|
- code
|
|
- message
|