Skip to content

Commit

Permalink
split documents into multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
philsturgeon committed Feb 2, 2024
1 parent 185ac73 commit 702f9ed
Show file tree
Hide file tree
Showing 14 changed files with 385 additions and 282 deletions.
8 changes: 8 additions & 0 deletions components/responses/BadRequest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Bad Request
content:
application/problem+json:
example:
type: https://example.com/errors/bad-request
title: Bad Request
status: 400
detail: The request is invalid or missing required parameters.
8 changes: 8 additions & 0 deletions components/responses/Conflict.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Conflict
content:
application/problem+json:
example:
type: https://example.com/errors/conflict
title: Conflict
status: 409
detail: There is a conflict with an existing resource.
8 changes: 8 additions & 0 deletions components/responses/Forbidden.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Forbidden
content:
application/problem+json:
example:
type: https://example.com/errors/forbidden
title: Forbidden
status: 403
detail: Access is forbidden for the provided credentials.
8 changes: 8 additions & 0 deletions components/responses/InternalServerError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Internal Server Error
content:
application/problem+json:
example:
type: https://example.com/errors/internal-server-error
title: Internal Server Error
status: 500
detail: An unexpected error occurred.
8 changes: 8 additions & 0 deletions components/responses/NotFound.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Not Found
content:
application/problem+json:
example:
type: https://example.com/errors/not-found
title: Not Found
status: 404
detail: The requested resource was not found.
8 changes: 8 additions & 0 deletions components/responses/TooManyRequests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Too Many Requests
content:
application/problem+json:
example:
type: https://example.com/errors/too-many-requests
title: Too Many Requests
status: 429
detail: You have exceeded the rate limit.
8 changes: 8 additions & 0 deletions components/responses/Unauthorized.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description: Unauthorized
content:
application/problem+json:
example:
type: https://example.com/errors/unauthorized
title: Unauthorized
status: 401
detail: You do not have the necessary permissions.
26 changes: 26 additions & 0 deletions components/schemas/Booking.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
type: object
properties:
booking_id:
type: string
format: uuid
description: Unique identifier for the booking
readOnly: true
examples:
- efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
trip_id:
type: string
format: uuid
description: Identifier of the booked trip
examples:
- efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
passenger_name:
type: string
description: Name of the passenger
examples:
- John Doe
has_bicycle:
type: boolean
description: Indicates whether the passenger has a bicycle
has_dog:
type: boolean
description: Indicates whether the passenger has a dog
28 changes: 28 additions & 0 deletions components/schemas/Station.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
type: object
properties:
id:
type: string
format: uuid
description: Unique identifier for the station
examples:
- efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
- b2e783e1-c824-4d63-b37a-d8d698862f1d
name:
type: string
description: The name of the station
examples:
- Berlin Hauptbahnhof
- Paris Gare du Nord
address:
type: string
description: The address of the station
examples:
- Invalidenstraße 10557 Berlin, Germany
- 18 Rue de Dunkerque 75010 Paris, France
country_code:
type: string
description: The country code of the station
format: iso-country-code
examples:
- DE
- FR
44 changes: 44 additions & 0 deletions components/schemas/Trip.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
type: object
properties:
id:
type: string
format: uuid
description: Unique identifier for the trip
examples:
- efdbb9d1-02c2-4bc3-afb7-6788d8782b1e
- b2e783e1-c824-4d63-b37a-d8d698862f1d
origin:
type: string
description: The starting station of the trip
examples:
- Berlin Hauptbahnhof
- Paris Gare du Nord
destination:
type: string
description: The destination station of the trip
examples:
- Paris Gare du Nord
- Berlin Hauptbahnhof
departure_time:
type: string
format: date-time
description: The date and time when the trip departs
examples:
- '2024-02-01T10:00:00Z'
arrival_time:
type: string
format: date-time
description: The date and time when the trip arrives
examples:
- '2024-02-01T16:00:00Z'
price:
type: number
description: The cost of the trip
examples:
- 50
bicycles_allowed:
type: boolean
description: Indicates whether bicycles are allowed on the trip
dogs_allowed:
type: boolean
description: Indicates whether dogs are allowed on the trip
Loading

0 comments on commit 702f9ed

Please sign in to comment.