add places operations

This commit is contained in:
2026-07-14 01:25:57 +07:00
parent 2b11c49b3c
commit 7a657926f1
12 changed files with 502 additions and 175 deletions
+130 -109
View File
@@ -288,107 +288,6 @@
]
}
},
"/api/scenarios/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": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/evening_detective_serverAddScenarioPlaceReq"
}
}
],
"tags": [
"Точки сценария"
]
}
},
"/api/scenarios/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": "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": "code",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EveningDetectiveServerUpdateScenarioPlaceBody"
}
}
],
"tags": [
"Точки сценария"
]
}
},
"/api/scenarios/{id}": {
"get": {
"summary": "Получить сценарий по id",
@@ -489,6 +388,128 @@
]
}
},
"/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/test/echo": {
"post": {
"summary": "Проверить обработку данных",
@@ -736,6 +757,14 @@
}
},
"definitions": {
"EveningDetectiveServerAddScenarioPlaceBody": {
"type": "object",
"properties": {
"place": {
"$ref": "#/definitions/evening_detective_serverPlace"
}
}
},
"EveningDetectiveServerAddUserRoleBody": {
"type": "object",
"properties": {
@@ -797,14 +826,6 @@
},
"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_serverAddScenarioPlaceReq": {
"type": "object",
"properties": {
"place": {
"$ref": "#/definitions/evening_detective_serverPlace"
}
}
},
"evening_detective_serverAddScenarioPlaceRsp": {
"type": "object",
"properties": {