feat: add created_at feed filters - #1821
Open
mackenziereading19 wants to merge 1 commit into
Open
Conversation
|
Thanks for opening this pull request! You're awesome. We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix. Examples of titles with semantic prefixes:
|
Contributor
Author
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.



Summary:
Adds
created_afterandcreated_beforequery parameters to the feed-list endpoints so API consumers can filter feeds based on when they were added to the Mobility Database.This addresses #874, where stakeholders want to track newly added feeds. The
created_after/created_beforenaming follows the existingdownloaded_after/downloaded_beforeAPI pattern.The filters are available on:
/v1/feeds/v1/gtfs_feeds/v1/gtfs_rt_feeds/v1/gbfs_feedsExpected behavior:
created_afterandcreated_beforeaccept ISO date/time values and apply inclusive bounds:created_after→created_at >= valuecreated_before→created_at <= valueThey can be supplied independently or together to define a range. Invalid date values return
422.No database migration is required because
created_atalready exists on feed records.Testing tips:
Test any of the four feed-list endpoints with:
?created_after=<ISO datetime>?created_before=<ISO datetime>422responseIntegration tests cover all four endpoints, inclusive boundary behavior, combined ranges, and invalid values.
Local verification:
Full feed API integration suite: 111 passed
Broader relevant feed tests: 144 passed
Focused
created_attests: 16 passedBlack: passed
git diff --check: passedRun the unit tests with
./scripts/api-tests.shto make sure you didn't break anythingAdd or update any needed documentation to the repo
Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification
Linked all relevant issues
Include screenshot(s) showing how this pull request works and fixes the issue(s)
Closes #874