{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "API Trip Plan", "description": "Документация на OpenAPI Trip Plan", "x-jentic-source-url": "https://api.swaggerhub.com/apis/IGORBACH/API_TripPlan/1.0.0/swagger.json" }, "servers": [ { "description": "SwaggerHub API Auto Mocking", "url": "https://virtserver.swaggerhub.com/IGORBACH/API_TripPlan/1.0.0" } ], "paths": { "/client_base": { "post": { "tags": [ "Client base" ], "summary": "Создать путешествие", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "NameCountry": { "type": "string", "example": "Испания", "description": "Название страны" }, "NameCity": { "type": "string", "example": "Мадрид", "description": "Название фильма" }, "DepartureDate": { "type": "string", "format": "date-time", "example": "25.05.2024", "description": "Дата отправления в путешествие" }, "ArrivalDate": { "type": "string", "format": "date-time", "example": "01.06.2024", "description": "Дата прибытия из путешествия" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/xml": { "schema": { "type": "object", "properties": { "IDTrip": { "type": "integer", "example": 124695, "description": "ID путешествия" }, "StatusTrip": { "type": "string", "example": "Создано", "description": "Статус путешествия" } } } }, "application/json": { "schema": { "type": "object", "properties": { "IDTrip": { "type": "integer", "example": 124695, "description": "ID путешествия" }, "StatusTrip": { "type": "string", "example": "Создано", "description": "Статус путешествия" } } } } } }, "400": { "description": "Bad Request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } } }, "/client_base2": { "post": { "tags": [ "Client base" ], "summary": "Добавить файл с билетами и ваучерами", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "FileName": { "type": "string", "example": "Файл 123 (2)", "description": "Название файла" }, "FileCategory": { "type": "string", "example": "Ваучер", "description": "Категория файла" } } } } } }, "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } } }, "/client_base3": { "post": { "tags": [ "Client base" ], "summary": "Добавить достопримечательности для посещения", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "NameSight": { "type": "string", "example": "Собор Альмудена", "description": "Название достопримечательности" } } } } } }, "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } } }, "/client_base4": { "post": { "tags": [ "Client base" ], "summary": "Добавить расходы для путешествия", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "ExpenseCategory": { "type": "string", "example": "Еда", "description": "Категория расходов" }, "AmountExpense": { "type": "number", "example": 5400, "description": "Сумма расходов" } } } } } }, "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } }, "get": { "tags": [ "Client base" ], "summary": "Получить информацию по итоговой стоимости", "parameters": [ { "name": "IDTrip", "in": "query", "required": true, "description": "ID путешествия", "schema": { "type": "integer" } }, { "name": "AmountExpense", "in": "query", "required": true, "description": "Сумма расходов", "schema": { "type": "number" } } ], "responses": { "200": { "description": "OK", "content": { "application/xml": { "schema": { "type": "object", "properties": { "TotalAmountExpense": { "type": "number", "description": "Итоговая сумма расходов" } } } }, "application/json": { "schema": { "type": "object", "properties": { "TotalAmountExpense": { "type": "number", "description": "Итоговая сумма расходов" } } } } } }, "400": { "description": "Bad Request" }, "404": { "description": "Not found" }, "500": { "description": "Internal Server Error" } } } } }, "components": {}, "tags": [] }