Repository navigation
fix: canonical trailing-slash URLs for subresource ID routes (#13) - #108
Merged
Merged
Conversation
Companion to nyjc-computing/campus#407 (server PR campus#910). Item paths built through ResourceCollection parents already ended in '/', but paths assembled through Resource parents or f-strings did not: - Submissions.by_assignment/by_student f-strings - Credentials.Provider.User get/delete/new/update - Vaults key ops (make_path(key, end_slash=True)) The remaining call sites now pass end_slash=True explicitly per the issue checklist — a no-op today, but it keeps the intent visible and guards against path-construction changes. Verb routes (submit, activate, add/remove) and subresource-name routes (links, responses, feedback) stay unslashed per convention. Two unit-test assertions updated to the slashed credentials user path.
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.
Closes #13. Companion to the server-side sweep (nyjc-computing/campus#407, PR campus#910).
What
Submissions.by_assignment()/by_student()f-string paths now end in/Credentials.Provider.Userget/delete/new/update:make_path(end_slash=True)Vaultskey ops:make_path(key, end_slash=True)Credentials.Provider,Vault.keys) now passend_slash=Trueexplicitly — a no-op today because paths built throughResourceCollectionparents already end in/, but it keeps the convention visible and guards against path-construction driftsubmit,activate,add/remove) and subresource-name routes (links,responses,feedback) stay unslashed per convention/auth/v1/credentials/campus/user1/pathTests
poetry run pytest: 291 passed.