Modified reference/OpenAPI.yml

This commit is contained in:
2023-03-03 16:10:43 +01:00
parent 9a677511e5
commit 81f5877d27
+49 -61
View File
@@ -5,7 +5,7 @@ info:
title: OpenAPI title: OpenAPI
version: '1.0' version: '1.0'
servers: servers:
- url: 'http://localhost:3000/v1' - url: 'http://localhost:3001/v1'
tags: tags:
- name: player - name: player
description: Everything about players description: Everything about players
@@ -32,24 +32,6 @@ paths:
$ref: '#/components/schemas/Weapon' $ref: '#/components/schemas/Weapon'
operationId: get-weapon-list operationId: get-weapon-list
description: '' description: ''
put:
summary: ''
operationId: put-weapons
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/WeaponID'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/WeaponID'
security:
- server_token: []
/maps/: /maps/:
get: get:
summary: List Maps summary: List Maps
@@ -65,30 +47,6 @@ paths:
items: items:
$ref: '#/components/schemas/Map' $ref: '#/components/schemas/Map'
operationId: get-map-list operationId: get-map-list
put:
summary: ''
operationId: put-maps
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MapID'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/MapID'
security:
- server_token: []
requestBody:
content:
application/json:
schema:
type: string
example: mp_angel_city
/players: /players:
get: get:
summary: List Players summary: List Players
@@ -133,13 +91,49 @@ paths:
items: items:
$ref: '#/components/schemas/Server' $ref: '#/components/schemas/Server'
operationId: get-server-list operationId: get-server-list
/servers/register:
post: post:
summary: '' summary: ''
operationId: post-servers operationId: post-servers-register
responses: responses:
'200': '201':
description: OK description: Created
description: Register a new server content:
application/json:
schema:
type: object
properties:
id:
type: integer
token:
type: string
'403':
description: Forbidden
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: The name of your server as it appears on Northstar
description:
type: string
description: The description of your server as it appears on Northstar
auth_endpoint:
type: string
format: uri
example: 'http://80.45.78.10:8081/verify'
description: 'In most cases, this is the IP address of your server with the TCP port you forwarded'
required:
- name
- description
- auth_endpoint
description: ''
description: |-
Register a server on Tone API.
The server needs to be online on masterserver and reacheable by Tone.
'/servers/{serverId}': '/servers/{serverId}':
parameters: parameters:
- $ref: '#/components/parameters/serverId' - $ref: '#/components/parameters/serverId'
@@ -176,20 +170,15 @@ paths:
- server - server
operationId: post-kills operationId: post-kills
responses: responses:
'200': '201':
description: OK description: Created
content: '400':
application/json: description: Bad Request
schema:
type: object
properties:
id:
type: integer
'401': '401':
description: Unauthorized description: Unauthorized
parameters: [] parameters: []
security: security:
- server_token: [] - Auth_Token: []
description: Allows a Northstar server to record kills on the database description: Allows a Northstar server to record kills on the database
requestBody: requestBody:
content: content:
@@ -492,10 +481,9 @@ components:
death_count: death_count:
type: integer type: integer
securitySchemes: securitySchemes:
server_token: Auth_Token:
name: API Key type: http
type: apiKey scheme: basic
in: header
description: '' description: ''
parameters: parameters:
serverId: serverId: