Skip to content

Commit

Permalink
feat: switch to shared page/limit params
Browse files Browse the repository at this point in the history
  • Loading branch information
philsturgeon committed Nov 5, 2024
1 parent 777b99e commit eee3c70
Showing 1 changed file with 30 additions and 48 deletions.
78 changes: 30 additions & 48 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,8 @@ paths:
tags:
- Stations
parameters:
- name: page
in: query
description: The page number to return
required: false
schema:
type: integer
minimum: 1
default: 1
example: 1
- name: limit
in: query
description: The number of items to return per page
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 10
example: 10
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- name: coordinates
in: query
description: >
Expand Down Expand Up @@ -196,6 +179,8 @@ paths:
tags:
- Trips
parameters:
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
- name: origin
in: query
description: The ID of the origin station
Expand Down Expand Up @@ -238,25 +223,6 @@ paths:
schema:
type: boolean
default: false
- name: page
in: query
description: The page of results to be returned
required: false
schema:
type: integer
minimum: 1
default: 1
example: 1
- name: limit
in: query
description: The number of items to return per page
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 10
example: 10
responses:
'200':
description: A list of available train trips
Expand Down Expand Up @@ -341,15 +307,8 @@ paths:
tags:
- Bookings
parameters:
- name: page
in: query
description: The page number to return
required: false
schema:
type: integer
minimum: 1
default: 1
example: 1
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/limit'
responses:
'200':
description: A list of bookings
Expand Down Expand Up @@ -736,6 +695,30 @@ webhooks:
description: Return a 200 status to indicate that the data was received successfully.

components:
parameters:
page:
name: page
in: query
description: The page number to return
required: false
schema:
type: integer
minimum: 1
default: 1
example: 1

limit:
name: limit
in: query
description: The number of items to return per page
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 10
example: 10

securitySchemes:
OAuth2:
type: oauth2
Expand Down Expand Up @@ -1104,7 +1087,6 @@ components:
date:
value: 'Fri, 31 Dec 2021 23:59:59 GMT'
summary: Retry after the specified date

responses:
BadRequest:
description: Bad Request
Expand Down

0 comments on commit eee3c70

Please sign in to comment.