Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace API collection paths with search parameters #3869

Closed
obulat opened this issue Mar 4, 2024 · 0 comments · Fixed by #3887
Closed

Replace API collection paths with search parameters #3869

obulat opened this issue Mar 4, 2024 · 0 comments · Fixed by #3887
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: api Related to the Django API

Comments

@obulat
Copy link
Contributor

obulat commented Mar 4, 2024

Problem

Additional search views in the API should use the /search endpoint with query parameters instead of separate endpoints with path parameters.

Description

The following changes are necessary:

  • remove the new endpoints (tag, creator and source)
  • update the serializer to use unstable__collection and also add unstable_tag (singular, in addition to plural tags that's used for search within tags instead of exact match)
  • update the build_collection_query method

Additional changes

During the writing and review process, the following changes were also added:

  • the MediaSearchRequestSourceSerializer was merged into the MediaSearchRequestSerializer. We now need to add media_type to the serializer context when calling it.
  • SHOW_COLLECTION_DOCS env variable allows to show the updated documentation for the search endpoint. When it's set to False, no changes are shown in the API doc site.

Additional context

The changes were discussed in Rethinking additional search views URLs

@obulat obulat added 🟧 priority: high Stalls work on the project or its dependents ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: api Related to the Django API labels Mar 4, 2024
@obulat obulat self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: api Related to the Django API
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant