docs: add stops-for-agency API endpoint documentation#171
docs: add stops-for-agency API endpoint documentation#171Hitanshi7556 wants to merge 2 commits intoOneBusAway:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds REST API documentation and supporting site data/assets for the newly introduced stops-for-agency endpoint so it appears in the methods index and includes a real example response.
Changes:
- Added a new method documentation page for
stops-for-agency. - Registered
stops-for-agencyin the REST API methods index data. - Added an example JSON response for the Unitrans agency.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/api/where/methods/stops-for-agency.md | New documentation page for the stops-for-agency endpoint (frontmatter + request/response sections). |
| src/_data/rest_api.json | Adds stops-for-agency to the methods list so it appears in the API index. |
| src/api/example_responses/stops-for-agency-unitrans.json | Adds a real-world example response payload for the new endpoint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| layout: rest_api | ||
| title: stops-for-agency Method | ||
| description: Retrieve the list of all stops for a particular agency by id. | ||
| sample_request_url: http://localhost:8080/onebusaway-api-webapp/api/where/stops-for-agency/unitrans.json?key=TEST |
| ## Request Parameters | ||
|
|
||
| * `id` - the id of the agency, encoded directly in the URL: | ||
| * `http://api.pugetsound.onebusaway.org/api/where/stops-for-agency/[ID GOES HERE].json` |
| }, | ||
|
|
||
| "stops-for-agency": { | ||
| "description": "get a list of all stops for an agency" |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds documentation for the new stops-for-agency endpoint in the “where” REST API docs, including adding it to the methods index and providing a real example response.
Changes:
- Added a new method doc page for
stops-for-agency. - Registered
stops-for-agencyin the REST API methods index data. - Added an example JSON response for the Unitrans agency.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/api/where/methods/stops-for-agency.md | New endpoint documentation page (front matter + request/response notes). |
| src/_data/rest_api.json | Adds the endpoint to the methods index so it appears in the docs navigation. |
| src/api/example_responses/stops-for-agency-unitrans.json | Example payload used by the new doc page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| layout: rest_api | ||
| title: stops-for-agency Method | ||
| description: Retrieve the list of all stops for a particular agency by id. | ||
| sample_request_url: http://localhost:8080/onebusaway-api-webapp/api/where/stops-for-agency/unitrans.json?key=TEST |
| title: stops-for-agency Method | ||
| description: Retrieve the list of all stops for a particular agency by id. |
| ## Request Parameters | ||
|
|
||
| * `id` - the id of the agency, encoded directly in the URL: | ||
| * `http://api.pugetsound.onebusaway.org/api/where/stops-for-agency/[ID GOES HERE].json` |
| }, | ||
|
|
||
| "stops-for-agency": { | ||
| "description": "get a list of all stops for an agency" |
Closes #145
Changes
src/api/where/methods/stops-for-agency.mdwith full endpoint documentationstops-for-agencyentry tosrc/_data/rest_api.jsonso the endpoint appears in the API methods indexsrc/api/example_responses/stops-for-agency-unitrans.jsonwith a real response from the Unitrans agencyThis endpoint was added in OneBusAway 2.5.13 per OneBusAway/onebusaway-application-modules#367.
Please let know if any changes are required
thank you!