From c7b96c866d8f0bb2a880bef6f9593ea441f71676 Mon Sep 17 00:00:00 2001 From: Falmer Date: Mon, 23 Feb 2026 12:17:30 +0300 Subject: [PATCH] Update flight service --- flight-service/index.md | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/flight-service/index.md b/flight-service/index.md index e672044..7a22b1e 100644 --- a/flight-service/index.md +++ b/flight-service/index.md @@ -124,7 +124,10 @@ GET /api/airport/{id} HTTP/1.1 Accept: application/json ``` -```json title="Response Body Example" +
+ Response Example + +```json title="Body" { "id": 32, "Name": "Airport #32", @@ -132,6 +135,7 @@ Accept: application/json "latitude": 39.929261 } ``` +
### Список всех аэропортов @@ -151,7 +155,10 @@ Accept: application/json -```json title="Response Body Example" +
+ Response Example + +```json title="Body" [ { "id": 32, @@ -162,6 +169,8 @@ Accept: application/json ... ] ``` +
+ ### Создание нового рейса @@ -172,7 +181,10 @@ POST /api/flight HTTP/1.1 Accept: application/json ``` -```json title="Request Body Example" +
+ Request Example + +```json title="Body" { "departure_airport": 12, "arrival_airport": 15, @@ -180,8 +192,12 @@ Accept: application/json "departure_timestamp": 1771834281934 } ``` +
-```json title="Response Body Example" +
+ Response Example + +```json title="Body" { "id": 1, "departure_airport": { @@ -206,6 +222,7 @@ Accept: application/json "passengers": [] } ``` +
### Получение информации о рейсе @@ -216,7 +233,10 @@ GET /api/flight/{id} HTTP/1.1 Accept: application/json ``` -```json title="Response Body Example" +
+ Response Example + +```json title="Body" { "id": 1, "departure_airport": { @@ -249,6 +269,7 @@ Accept: application/json ] } ``` +
### Регистрация пассажира на рейс @@ -258,9 +279,13 @@ Accept: application/json POST /api/flight/register HTTP/1.1 ``` -```json title="Request Body Example" +
+ Request Example + +```json title="Body" { "flight_id": 1, "user_id": 3 } -``` \ No newline at end of file +``` +
\ No newline at end of file