Skip to content

API v4 collections controller, serializer and routes - #296

Draft
louispt1 wants to merge 2 commits into
api-v4from
api-v4-collections
Draft

API v4 collections controller, serializer and routes#296
louispt1 wants to merge 2 commits into
api-v4from
api-v4-collections

Conversation

@louispt1

Copy link
Copy Markdown
Member

Context

Split out of the old api-v2 branch. This branch and api-v4-saved-scenarios both add the v2 namespace to routes.

Decisions
  • This is built based on Collections relying on SavedScenarios, so it cannot be merged until the Collections model has been migrated to rely on SavedScenarios.
  • Membership is scoped based on what the collection's owner can see based on SavedScenarioUser
  • There was a bug with the version_consistency method relying on .map which has been resolved so errors can see what's happening via filter_map.
  • shared_access on CollectionSavedScenario called saved_scenario.viewer? without checking the association resolved which would have raised an error

Implemented changes

  • /api/v2/collections for index, show, create, update, destroy, discard and restore.
  • CollectionSerialiser contains an allow-list, so new database columns have to join the public API contract explicitly

Related

Goes with #295

@louispt1
louispt1 force-pushed the api-v4-collections branch from ffd22e1 to 0546dd6 Compare August 25, 2026 11:21
@louispt1
louispt1 requested a review from noracato August 25, 2026 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant