Skip to content

Commit

Permalink
feat: Add API endpoint for retrieving stops by agency ID and update r…
Browse files Browse the repository at this point in the history
…esponse schemas
  • Loading branch information
Ahmedhossamdev committed Nov 29, 2024
1 parent a210d85 commit ede0fc4
Showing 1 changed file with 39 additions and 35 deletions.
74 changes: 39 additions & 35 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,26 @@ paths:
- $ref: '#/components/schemas/ResponseWrapper'
- $ref: '#/components/schemas/StopsForRouteResponse'

/api/where/stops-for-agency/{agencyID}.json:
parameters:
- name: agencyID
in: path
required: true
schema:
type: string
description: ID of the agency
get:
summary: Get stops for a specific agency
responses:
'200':
description: Successful response
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/ResponseWrapper'
- $ref: '#/components/schemas/StopsForAgencyResponse'

/api/where/stop/{stopID}.json:
parameters:
- name: stopID
Expand Down Expand Up @@ -1501,11 +1521,13 @@ components:
wheelchairBoarding:
type: string
required:
- code
- id
- lat
- lon
- name
- parent
- routeIds
- staticRouteIds

Trip:
type: object
Expand Down Expand Up @@ -1603,53 +1625,35 @@ components:
- entry
- references

StopsForLocation:
StopsForLocationResponse:
type: object
properties:
code:
type: string
direction:
type: string
id:
type: string
lat:
type: number
locationType:
type: integer
lon:
type: number
name:
type: string
parent:
type: string
routeIds:
type: array
items:
type: string
staticRouteIds:
limitExceeded:
type: boolean
outOfRange:
type: boolean
list:
type: array
items:
type: string
wheelchairBoarding:
type: string
$ref: '#/components/schemas/Stop'
references:
$ref: '#/components/schemas/Reference'
required:
- id
- lat
- lon
- name
- parent
- routeIds
- staticRouteIds
- list
- references
- limitExceeded

StopsForLocationResponse:
StopsForAgencyResponse:
type: object
properties:
limitExceeded:
type: boolean
outOfRange:
type: boolean
list:
type: array
items:
$ref: '#/components/schemas/StopsForLocation'
$ref: '#/components/schemas/Stop'
references:
$ref: '#/components/schemas/Reference'
required:
Expand Down

0 comments on commit ede0fc4

Please sign in to comment.