101 lines
2.6 KiB
JSON
101 lines
2.6 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Intro. to Network Programming Game",
|
|
"contact": {},
|
|
"license": {
|
|
"name": "0BSD"
|
|
},
|
|
"version": "0.0.1-alpha"
|
|
},
|
|
"basePath": "/",
|
|
"paths": {
|
|
"/api/lobby/rooms": {
|
|
"get": {
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/lobby/users": {
|
|
"get": {
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/api/user": {
|
|
"get": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Username to be queried",
|
|
"name": "username",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/logout": {
|
|
"post": {
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/auth/register": {
|
|
"post": {
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "query params",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/models.User"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"models.User": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BasicAuth": {
|
|
"type": "basic"
|
|
}
|
|
}
|
|
} |