1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-22 06:05:38 +01:00
GiantsTools/Giants.WebApi.Clients/swagger.json
2020-08-11 01:29:45 -07:00

289 lines
6.4 KiB
JSON

{
"x-generator": "NSwag v13.7.0.0 (NJsonSchema v10.1.24.0 (Newtonsoft.Json v10.0.0.0))",
"openapi": "3.0.0",
"info": {
"title": "My Title",
"version": "1.0.0"
},
"servers": [
{
"url": "https://localhost:44304"
}
],
"paths": {
"/api/Version": {
"get": {
"tags": [
"Version"
],
"operationId": "Version_GetVersionInfo",
"parameters": [
{
"name": "appName",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/VersionInfo"
}
}
}
}
}
}
},
"/api/Servers": {
"delete": {
"tags": [
"Servers"
],
"operationId": "Servers_DeleteServer",
"responses": {
"200": {
"description": ""
}
}
},
"get": {
"tags": [
"Servers"
],
"operationId": "Servers_GetServers",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ServerInfoWithHostAddress"
}
}
}
}
}
}
},
"post": {
"tags": [
"Servers"
],
"operationId": "Servers_AddServer",
"requestBody": {
"x-name": "serverInfo",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ServerInfo"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": ""
}
}
}
}
},
"components": {
"schemas": {
"VersionInfo": {
"type": "object",
"additionalProperties": false,
"required": [
"appName",
"version",
"installerUri"
],
"properties": {
"appName": {
"type": "string",
"minLength": 1
},
"version": {
"$ref": "#/components/schemas/AppVersion"
},
"installerUri": {
"type": "string",
"format": "uri",
"minLength": 1
}
}
},
"AppVersion": {
"type": "object",
"additionalProperties": false,
"required": [
"build",
"major",
"minor",
"revision"
],
"properties": {
"build": {
"type": "integer",
"format": "int32"
},
"major": {
"type": "integer",
"format": "int32"
},
"minor": {
"type": "integer",
"format": "int32"
},
"revision": {
"type": "integer",
"format": "int32"
}
}
},
"ServerInfoWithHostAddress": {
"allOf": [
{
"$ref": "#/components/schemas/ServerInfo"
},
{
"type": "object",
"additionalProperties": false,
"required": [
"hostIpAddress"
],
"properties": {
"hostIpAddress": {
"type": "string",
"minLength": 1
}
}
}
]
},
"ServerInfo": {
"type": "object",
"additionalProperties": false,
"required": [
"gameName",
"version",
"sessionName",
"port",
"mapName",
"gameType",
"numPlayers",
"gameState",
"timeLimit",
"fragLimit",
"teamFragLimit",
"firstBaseComplete",
"playerInfo"
],
"properties": {
"gameName": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"version": {
"$ref": "#/components/schemas/AppVersion"
},
"sessionName": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"port": {
"type": "integer",
"format": "int32"
},
"mapName": {
"type": "string",
"maxLength": 300,
"minLength": 0
},
"gameType": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"numPlayers": {
"type": "integer",
"format": "int32"
},
"gameState": {
"type": "string",
"maxLength": 100,
"minLength": 0
},
"timeLimit": {
"type": "integer",
"format": "int32"
},
"fragLimit": {
"type": "integer",
"format": "int32"
},
"teamFragLimit": {
"type": "integer",
"format": "int32"
},
"firstBaseComplete": {
"type": "boolean"
},
"playerInfo": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PlayerInfo"
}
}
}
},
"PlayerInfo": {
"type": "object",
"additionalProperties": false,
"required": [
"index",
"name",
"frags",
"deaths",
"teamName"
],
"properties": {
"index": {
"type": "integer",
"format": "int32"
},
"name": {
"type": "string",
"minLength": 1
},
"frags": {
"type": "integer",
"format": "int32"
},
"deaths": {
"type": "integer",
"format": "int32"
},
"teamName": {
"type": "string",
"minLength": 1
}
}
}
}
}
}