Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request aligns the Infobus API with the OpenAPI contract (
datahub.yml), focusing on response shape consistency, types, error envelopes, and schema-safe outputs across:service_alerts,user_reports/user_data,wide_alerts/weather/social)Summary of Changes
GTFS Schedule
limit/offsetslicing without DRF pagination envelopes.External Endpoints
service_alertsendpoint and updated other external endpoints using a spec-first approach (contract compliance over “invented” data).user_reports:maxItems)description)b64)social/weather/wide_alerts/user_databehavior:{code,message}url+timestamp)OpenAPI Consistency Guarantees
{ "code": int, "message": string }.limit/offsetpreserves payload shape.nullwhere disallowed[]instead ofnull)Configuration
DATAHUB_REALTIME_TTL_SECONDS(default300)DATAHUB_API_KEY(protects write operations)DATAHUB_USER_REPORTS_RETENTION_DAYS(default30)Note (Untested / Pending Spec Approval)
This change set has not been fully tested or end-to-end verified yet, as final validation is pending spec approval/confirmation and full environment verification.
Tooling Note
Implementation work was guided using GitHub Copilot (GPT-5.2) as an assistive tool during development.