Skip to content

Commit

Permalink
add operator
Browse files Browse the repository at this point in the history
  • Loading branch information
philsturgeon committed Feb 2, 2024
1 parent 6dcb4ac commit 7a0411c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions components/schemas/Trip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 14 additions & 2 deletions paths/trips.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ get:
schema:
type: string
format: uuid
example: efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
- name: destination
in: query
description: The ID of the destination station
required: true
schema:
type: string
format: uuid
example: b2e783e1-c824-4d63-b37a-d8d698862f1d
- name: date
in: query
description: The date of the trip (YYYY-MM-DD)
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 7a0411c

Please sign in to comment.