diff --git a/components/schemas/Trip.yaml b/components/schemas/Trip.yaml index dcaf3f9..e45da22 100644 --- a/components/schemas/Trip.yaml +++ b/components/schemas/Trip.yaml @@ -31,6 +31,12 @@ properties: description: The date and time when the trip arrives examples: - '2024-02-01T16:00:00Z' + operator: + type: string + description: The name of the operator of the trip + examples: + - Deutsche Bahn + - SNCF price: type: number description: The cost of the trip diff --git a/paths/trips.yaml b/paths/trips.yaml index e74e8bf..45bb2dd 100644 --- a/paths/trips.yaml +++ b/paths/trips.yaml @@ -13,6 +13,7 @@ get: schema: type: string format: uuid + example: efdbb9d1-02c2-4bc3-afb7-6788d8782b1e - name: destination in: query description: The ID of the destination station @@ -20,6 +21,7 @@ get: schema: type: string format: uuid + example: b2e783e1-c824-4d63-b37a-d8d698862f1d - name: date in: query description: The date of the trip (YYYY-MM-DD) @@ -64,11 +66,21 @@ get: departure_time: '2024-02-01T10:00:00Z' arrival_time: '2024-02-01T16:00:00Z' price: 50 + operator: Deutsche Bahn + bicycles_allowed: true + dogs_allowed: true + - id: b2e783e1-c824-4d63-b37a-d8d698862f1d + origin: Paris Gare du Nord + destination: Berlin Hauptbahnhof + departure_time: '2024-02-01T12:00:00Z' + arrival_time: '2024-02-01T18:00:00Z' + price: 50 + operator: SNCF bicycles_allowed: true dogs_allowed: true links: - self: https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&date=2024-02-01 - next: https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&date=2024-02-01&page=2 + self: https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01 + next: https://api.example.com/trips?origin=efdbb9d1-02c2-4bc3-afb7-6788d8782b1e&destination=b2e783e1-c824-4d63-b37a-d8d698862f1d&date=2024-02-01&page=2 '401': $ref: ../components/responses/Unauthorized.yaml '403':