312 lines
7.1 KiB
JSON
312 lines
7.1 KiB
JSON
{
|
|
"openapi": "3.0.1",
|
|
"info": {
|
|
"title": "Server",
|
|
"version": "1.0"
|
|
},
|
|
"paths": {
|
|
"/api/Game": {
|
|
"get": {
|
|
"tags": [
|
|
"Game"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
}
|
|
},
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"Game"
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"application/*+json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"500": {
|
|
"description": "Server Error"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/Game/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"Game"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
},
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Game"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"Game"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"application/*+json": {
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"500": {
|
|
"description": "Server Error"
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"content": {
|
|
"text/plain": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
},
|
|
"text/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ProblemDetails"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"Game"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Success"
|
|
},
|
|
"500": {
|
|
"description": "Server Error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"schemas": {
|
|
"Game": {
|
|
"required": [
|
|
"titel",
|
|
"zustand"
|
|
],
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"titel": {
|
|
"minLength": 1,
|
|
"type": "string"
|
|
},
|
|
"zustand": {
|
|
"$ref": "#/components/schemas/Zustand"
|
|
},
|
|
"kommentar": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"ProblemDetails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"status": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"nullable": true
|
|
},
|
|
"detail": {
|
|
"type": "string",
|
|
"nullable": true
|
|
},
|
|
"instance": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
"additionalProperties": { }
|
|
},
|
|
"Zustand": {
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
}
|
|
} |