generated from VLADIMIR/template
1472 lines
41 KiB
JSON
1472 lines
41 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "Документация сервиса \"Вечерний детектив\"",
|
|
"version": "v0.1.0"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "EveningDetectiveServer"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/api/auth/login": {
|
|
"post": {
|
|
"summary": "Войти и получить токена доступа",
|
|
"operationId": "EveningDetectiveServer_Login",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverLoginRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverLoginReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Регистрация и вход"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/auth/refresh": {
|
|
"post": {
|
|
"summary": "Обновить токена доступа",
|
|
"operationId": "EveningDetectiveServer_Refresh",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverRefreshRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverRefreshReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Регистрация и вход"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/auth/refresh-password": {
|
|
"post": {
|
|
"summary": "Обновить пароль",
|
|
"operationId": "EveningDetectiveServer_RefreshPassword",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverRefreshPasswordRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverRefreshPasswordReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Регистрация и вход"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/auth/signup": {
|
|
"post": {
|
|
"summary": "Зарегистрироваться",
|
|
"operationId": "EveningDetectiveServer_Signup",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverSignupRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverSignupReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Регистрация и вход"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/catalog": {
|
|
"get": {
|
|
"summary": "Получить каталог сценариев",
|
|
"operationId": "EveningDetectiveServer_GetScenariosCatalog",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetScenariosCatalogRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/files/upload": {
|
|
"post": {
|
|
"summary": "Загрузить файл",
|
|
"operationId": "EveningDetectiveServer_UploadFile",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverUploadFileRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverUploadFileReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Файлы"
|
|
]
|
|
}
|
|
},
|
|
"/api/files/{filename}": {
|
|
"get": {
|
|
"summary": "Получить файл",
|
|
"operationId": "EveningDetectiveServer_DownloadFile",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/apiHttpBody"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "filename",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Файлы"
|
|
]
|
|
}
|
|
},
|
|
"/api/my-scenarios": {
|
|
"get": {
|
|
"summary": "Получить свои сценарии",
|
|
"operationId": "EveningDetectiveServer_GetMyScenarios",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetMyScenariosRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenario": {
|
|
"post": {
|
|
"summary": "Создать сценарий",
|
|
"operationId": "EveningDetectiveServer_AddScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverAddScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverAddScenarioReq"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}": {
|
|
"get": {
|
|
"summary": "Получить сценарий по id",
|
|
"operationId": "EveningDetectiveServer_GetScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
},
|
|
"delete": {
|
|
"summary": "Удалить сценарий",
|
|
"operationId": "EveningDetectiveServer_DeleteScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverDeleteScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
},
|
|
"put": {
|
|
"summary": "Редактировать сценарий",
|
|
"operationId": "EveningDetectiveServer_UpdateScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverUpdateScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerUpdateScenarioBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}/draft": {
|
|
"put": {
|
|
"summary": "Снять с публикации сценарий",
|
|
"operationId": "EveningDetectiveServer_DraftScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverDraftScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerDraftScenarioBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}/full": {
|
|
"get": {
|
|
"summary": "Получить сценарий со всеми деталями по id",
|
|
"operationId": "EveningDetectiveServer_GetFullScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}/places": {
|
|
"post": {
|
|
"summary": "Создать точку сценария",
|
|
"operationId": "EveningDetectiveServer_AddScenarioPlace",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverAddScenarioPlaceRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerAddScenarioPlaceBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Точки сценария"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}/places/{code}": {
|
|
"delete": {
|
|
"summary": "Удалить точку сценария",
|
|
"operationId": "EveningDetectiveServer_DeleteScenarioPlace",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverDeleteScenarioPlaceRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Точки сценария"
|
|
]
|
|
},
|
|
"put": {
|
|
"summary": "Обновить точку сценария",
|
|
"operationId": "EveningDetectiveServer_UpdateScenarioPlace",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverUpdateScenarioPlaceRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "code",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerUpdateScenarioPlaceBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Точки сценария"
|
|
]
|
|
}
|
|
},
|
|
"/api/scenarios/{id}/public": {
|
|
"put": {
|
|
"summary": "Опубликовать сценарий",
|
|
"operationId": "EveningDetectiveServer_PublicScenario",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverPublicScenarioRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerPublicScenarioBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Сценарии"
|
|
]
|
|
}
|
|
},
|
|
"/api/test/echo": {
|
|
"post": {
|
|
"summary": "Проверить обработку данных",
|
|
"operationId": "EveningDetectiveServer_Echo",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverEchoRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "text",
|
|
"in": "query",
|
|
"required": false,
|
|
"type": "string"
|
|
}
|
|
],
|
|
"tags": [
|
|
"EveningDetectiveServer"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/test/ping": {
|
|
"get": {
|
|
"summary": "Проверить доступность",
|
|
"operationId": "EveningDetectiveServer_Ping",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverPingRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"EveningDetectiveServer"
|
|
],
|
|
"security": [
|
|
{
|
|
"": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/ui/permissions": {
|
|
"get": {
|
|
"summary": "Получить список доступных элементов интерфейса",
|
|
"operationId": "EveningDetectiveServer_GetPermissions",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetPermissionsRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Доступы"
|
|
]
|
|
}
|
|
},
|
|
"/api/users": {
|
|
"get": {
|
|
"summary": "Получить всех пользователей",
|
|
"operationId": "EveningDetectiveServer_GetUsers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetUsersRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Пользователи"
|
|
]
|
|
}
|
|
},
|
|
"/api/users/me": {
|
|
"get": {
|
|
"summary": "Получить информацию о себе",
|
|
"operationId": "EveningDetectiveServer_GetMe",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetMeRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"tags": [
|
|
"Пользователи"
|
|
]
|
|
}
|
|
},
|
|
"/api/users/{id}": {
|
|
"get": {
|
|
"summary": "Получить пользователя по id",
|
|
"operationId": "EveningDetectiveServer_GetUserById",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverGetUserByIdRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
],
|
|
"tags": [
|
|
"Пользователи"
|
|
]
|
|
}
|
|
},
|
|
"/api/users/{id}/role/add": {
|
|
"post": {
|
|
"summary": "Добавить пользователю роль",
|
|
"operationId": "EveningDetectiveServer_AddUserRole",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverAddUserRoleRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerAddUserRoleBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Пользователи"
|
|
]
|
|
}
|
|
},
|
|
"/api/users/{id}/role/delete": {
|
|
"post": {
|
|
"summary": "Забрать у пользователя роль",
|
|
"operationId": "EveningDetectiveServer_DeleteUserRole",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/evening_detective_serverDeleteUserRoleRsp"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/EveningDetectiveServerDeleteUserRoleBody"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"Пользователи"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"EveningDetectiveServerAddScenarioPlaceBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"place": {
|
|
"$ref": "#/definitions/evening_detective_serverPlace"
|
|
}
|
|
}
|
|
},
|
|
"EveningDetectiveServerAddUserRoleBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"EveningDetectiveServerDeleteUserRoleBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"EveningDetectiveServerDraftScenarioBody": {
|
|
"type": "object"
|
|
},
|
|
"EveningDetectiveServerPublicScenarioBody": {
|
|
"type": "object"
|
|
},
|
|
"EveningDetectiveServerUpdateScenarioBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"EveningDetectiveServerUpdateScenarioPlaceBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"place": {
|
|
"$ref": "#/definitions/evening_detective_serverPlace"
|
|
}
|
|
}
|
|
},
|
|
"apiHttpBody": {
|
|
"type": "object",
|
|
"properties": {
|
|
"contentType": {
|
|
"type": "string",
|
|
"description": "The HTTP Content-Type header value specifying the content type of the body."
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"format": "byte",
|
|
"description": "The HTTP request/response body as raw binary."
|
|
},
|
|
"extensions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/protobufAny"
|
|
},
|
|
"description": "Application specific response metadata. Must be set in the first response\nfor streaming APIs."
|
|
}
|
|
},
|
|
"description": "Message that represents an arbitrary HTTP body. It should only be used for\npayload formats that can't be represented as JSON, such as raw binary or\nan HTML page.\n\n\nThis message can be used both in streaming and non-streaming API methods in\nthe request as well as the response.\n\nIt can be used as a top-level request field, which is convenient if one\nwants to extract parameters from either the URL or HTTP template into the\nrequest fields and also want access to the raw HTTP body.\n\nExample:\n\n message GetResourceRequest {\n // A unique request id.\n string request_id = 1;\n\n // The raw HTTP body is bound to this field.\n google.api.HttpBody http_body = 2;\n\n }\n\n service ResourceService {\n rpc GetResource(GetResourceRequest)\n returns (google.api.HttpBody);\n rpc UpdateResource(google.api.HttpBody)\n returns (google.protobuf.Empty);\n\n }\n\nExample with streaming methods:\n\n service CaldavService {\n rpc GetCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n rpc UpdateCalendar(stream google.api.HttpBody)\n returns (stream google.api.HttpBody);\n\n }\n\nUse of this type only changes how the request and response bodies are\nhandled, all other features will continue to work unchanged."
|
|
},
|
|
"evening_detective_serverAddScenarioPlaceRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverAddScenarioReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverAddScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverAddUserRoleRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverApplication": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverDeleteScenarioPlaceRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverDeleteScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverDeleteUserRoleRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverDoor": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"keys": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverDraftScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverEchoRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetMeRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/evening_detective_serverUser"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetMyScenariosRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"scenarios": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverScenario"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetPermissionsRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"scenario": {
|
|
"$ref": "#/definitions/evening_detective_serverScenario"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetScenariosCatalogRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"scenarios": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverScenario"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetUserByIdRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"$ref": "#/definitions/evening_detective_serverUser"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverGetUsersRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"users": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverUser"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverKey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverLoginReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverLoginRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"accessToken": {
|
|
"type": "string"
|
|
},
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverPingRsp": {
|
|
"type": "object"
|
|
},
|
|
"evening_detective_serverPlace": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"hidden": {
|
|
"type": "boolean"
|
|
},
|
|
"applications": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverApplication"
|
|
}
|
|
},
|
|
"doors": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverDoor"
|
|
}
|
|
},
|
|
"keys": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverKey"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverPublicScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverRefreshPasswordReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverRefreshPasswordRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverRefreshReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverRefreshRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"accessToken": {
|
|
"type": "string"
|
|
},
|
|
"refreshToken": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverScenario": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"image": {
|
|
"type": "string"
|
|
},
|
|
"story": {
|
|
"$ref": "#/definitions/evening_detective_serverStory"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"$ref": "#/definitions/evening_detective_serverUser"
|
|
},
|
|
"updatedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"publishedAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverSignupReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverSignupRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverStory": {
|
|
"type": "object",
|
|
"properties": {
|
|
"places": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/evening_detective_serverPlace"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverUpdateScenarioPlaceRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverUpdateScenarioRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverUploadFileReq": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverUploadFileRsp": {
|
|
"type": "object",
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
},
|
|
"filename": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"evening_detective_serverUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"roles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"isActive": {
|
|
"type": "boolean"
|
|
},
|
|
"createdAt": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"protobufAny": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@type": {
|
|
"type": "string",
|
|
"description": "Identifies the type of the serialized Protobuf message with a URI reference\nconsisting of a prefix ending in a slash and the fully-qualified type name.\n\nExample: type.googleapis.com/google.protobuf.StringValue\n\nThis string must contain at least one `/` character, and the content after\nthe last `/` must be the fully-qualified name of the type in canonical\nform, without a leading dot. Do not write a scheme on these URI references\nso that clients do not attempt to contact them.\n\nThe prefix is arbitrary and Protobuf implementations are expected to\nsimply strip off everything up to and including the last `/` to identify\nthe type. `type.googleapis.com/` is a common default prefix that some\nlegacy implementations require. This prefix does not indicate the origin of\nthe type, and URIs containing it are not expected to respond to any\nrequests.\n\nAll type URL strings must be legal URI references with the additional\nrestriction (for the text format) that the content of the reference\nmust consist only of alphanumeric characters, percent-encoded escapes, and\ncharacters in the following set (not including the outer backticks):\n`/-.~_!$\u0026()*+,;=`. Despite our allowing percent encodings, implementations\nshould not unescape them to prevent confusion with existing parsers. For\nexample, `type.googleapis.com%2FFoo` should be rejected.\n\nIn the original design of `Any`, the possibility of launching a type\nresolution service at these type URLs was considered but Protobuf never\nimplemented one and considers contacting these URLs to be problematic and\na potential security issue. Do not attempt to contact type URLs."
|
|
}
|
|
},
|
|
"additionalProperties": {},
|
|
"description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nIn its binary encoding, an `Any` is an ordinary message; but in other wire\nforms like JSON, it has a special encoding. The format of the type URL is\ndescribed on the `type_url` field.\n\nProtobuf APIs provide utilities to interact with `Any` values:\n\n- A 'pack' operation accepts a message and constructs a generic `Any` wrapper\n around it.\n- An 'unpack' operation reads the content of an `Any` message, either into an\n existing message or a new one. Unpack operations must check the type of the\n value they unpack against the declared `type_url`.\n- An 'is' operation decides whether an `Any` contains a message of the given\n type, i.e. whether it can 'unpack' that type.\n\nThe JSON format representation of an `Any` follows one of these cases:\n\n- For types without special-cased JSON encodings, the JSON format\n representation of the `Any` is the same as that of the message, with an\n additional `@type` field which contains the type URL.\n- For types with special-cased JSON encodings (typically called 'well-known'\n types, listed in https://protobuf.dev/programming-guides/json/#any), the\n JSON format representation has a key `@type` which contains the type URL\n and a key `value` which contains the JSON-serialized value.\n\nThe text format representation of an `Any` is like a message with one field\nwhose name is the type URL in brackets. For example, an `Any` containing a\n`foo.Bar` message may be written `[type.googleapis.com/foo.Bar] { a: 2 }`."
|
|
},
|
|
"rpcStatus": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"$ref": "#/definitions/protobufAny"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"securityDefinitions": {
|
|
"BearerAuth": {
|
|
"type": "apiKey",
|
|
"description": "Authentication token, prefixed by Bearer: Bearer \u003ctoken\u003e",
|
|
"name": "Authorization",
|
|
"in": "header"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"BearerAuth": []
|
|
}
|
|
]
|
|
}
|