Update flight service

This commit is contained in:
2026-02-23 12:17:30 +03:00
parent d09f6d8d8c
commit c7b96c866d

View File

@@ -124,7 +124,10 @@ GET /api/airport/{id} HTTP/1.1
Accept: application/json Accept: application/json
``` ```
```json title="Response Body Example" <details>
<summary>Response Example</summary>
```json title="Body"
{ {
"id": 32, "id": 32,
"Name": "Airport #32", "Name": "Airport #32",
@@ -132,6 +135,7 @@ Accept: application/json
"latitude": 39.929261 "latitude": 39.929261
} }
``` ```
</details>
### Список всех аэропортов ### Список всех аэропортов
@@ -151,7 +155,10 @@ Accept: application/json
</details> </details>
```json title="Response Body Example" <details>
<summary>Response Example</summary>
```json title="Body"
[ [
{ {
"id": 32, "id": 32,
@@ -162,6 +169,8 @@ Accept: application/json
... ...
] ]
``` ```
</details>
### Создание нового рейса ### Создание нового рейса
@@ -172,7 +181,10 @@ POST /api/flight HTTP/1.1
Accept: application/json Accept: application/json
``` ```
```json title="Request Body Example" <details>
<summary>Request Example</summary>
```json title="Body"
{ {
"departure_airport": 12, "departure_airport": 12,
"arrival_airport": 15, "arrival_airport": 15,
@@ -180,8 +192,12 @@ Accept: application/json
"departure_timestamp": 1771834281934 "departure_timestamp": 1771834281934
} }
``` ```
</details>
```json title="Response Body Example" <details>
<summary>Response Example</summary>
```json title="Body"
{ {
"id": 1, "id": 1,
"departure_airport": { "departure_airport": {
@@ -206,6 +222,7 @@ Accept: application/json
"passengers": [] "passengers": []
} }
``` ```
</details>
### Получение информации о рейсе ### Получение информации о рейсе
@@ -216,7 +233,10 @@ GET /api/flight/{id} HTTP/1.1
Accept: application/json Accept: application/json
``` ```
```json title="Response Body Example" <details>
<summary>Response Example</summary>
```json title="Body"
{ {
"id": 1, "id": 1,
"departure_airport": { "departure_airport": {
@@ -249,6 +269,7 @@ Accept: application/json
] ]
} }
``` ```
</details>
### Регистрация пассажира на рейс ### Регистрация пассажира на рейс
@@ -258,9 +279,13 @@ Accept: application/json
POST /api/flight/register HTTP/1.1 POST /api/flight/register HTTP/1.1
``` ```
```json title="Request Body Example" <details>
<summary>Request Example</summary>
```json title="Body"
{ {
"flight_id": 1, "flight_id": 1,
"user_id": 3 "user_id": 3
} }
``` ```
</details>