[api] Clean up route naming inconsistencies#1157
Merged
Merged
Conversation
Register /data/entities/guess-from-path and /import/shotgun/project-connections as canonical kebab-case routes. The old paths stay registered as aliases because gazu and old sync scripts still post them. Route registration now reuses the view function when a resource class appears on several paths. Tests: files route tests cover both paths, shotgun teams test moved to the new path while fixtures keep covering the alias. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 CRUD collection routes plus the year-table and create-tasks routes were declared with a trailing slash while the rest of the API is not. strict_slashes is already disabled globally, so both forms keep responding. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rename attachment_id to attachment_file_id, descriptor_id to metadata_descriptor_id and template_id to project_template_id so path parameters match the model they identify. Add /data/user/sequences/<sequence_id>/task-types/<task_type_id>/subscribed aligned with its subscribe/unsubscribe siblings; the old entities path stays as a deprecated alias. URL shapes are unchanged for clients. Tests: sequence subscribe test asserts the subscribed status through both the new route and the deprecated alias. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problems
/data/entities/guess_from_pathand/import/shotgun/projectconnectionswere the only routes not in kebab-caseattachment_id,descriptor_id,template_id, and/data/user/entities/<sequence_id>/...which only handles sequencesSolutions
guess_from_path); route registration now reuses the view when a resource appears on several pathsstrict_slashesis already disabled globally, so both forms keep responding/data/user/sequences/<sequence_id>/task-types/<task_type_id>/subscribed, keeping the oldentitiespath as a deprecated alias