Skip to content

fix: add end_slash parameter to ResourceCollection.make_path() (#31) and devcontainer sync#33

Merged
ngjunsiang merged 2 commits into
mainfrom
dev/sync-devcontainer
May 15, 2026
Merged

fix: add end_slash parameter to ResourceCollection.make_path() (#31) and devcontainer sync#33
ngjunsiang merged 2 commits into
mainfrom
dev/sync-devcontainer

Conversation

@ngjunsiang
Copy link
Copy Markdown
Contributor

Summary

Changes

Bug Fix (#31)

  • Added end_slash parameter to ResourceCollection.make_path() method
  • This allows explicit control over trailing slash behavior for API endpoints
  • Updated all call sites across:
    • campus_python/api/v1/submissions.py
    • campus_python/api/v1/timetable.py
    • campus_python/auth/v1/clients.py
    • campus_python/auth/v1/sessions.py
    • campus_python/auth/v1/users.py

DevContainer

  • Simplified devcontainer by moving setup steps from post-create.sh into Dockerfile
  • Includes GitHub CLI, Railway CLI, Poetry configuration
  • Bumped version to 0.1.61

Test plan

  • Unit tests pass
  • All call sites updated with correct end_slash values

ngjunsiang and others added 2 commits May 15, 2026 12:54
…olve issue #31

Fixes #31 - ResourceCollection.make_path() incorrectly adds trailing slash to terminal endpoints

Changes:
- Add end_slash parameter to ResourceCollection.make_path() (defaults to True for backward compatibility)
- Update action endpoints to use end_slash=False to prevent trailing slashes on terminal endpoints
- Bump version to 0.1.61

Action endpoints updated:
- sessions.py: authorization_code, sweep
- clients.py: revoke, grant (in ClientAccess)
- users.py: activate
- submissions.py: submit
- timetable.py: current, next

This resolves 405 Method Not Allowed errors when servers use strict_slashes=True.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ngjunsiang ngjunsiang merged commit 1345b13 into main May 15, 2026
2 checks passed
@ngjunsiang ngjunsiang deleted the dev/sync-devcontainer branch May 15, 2026 14:24
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.

ResourceCollection.make_path() incorrectly adds trailing slash to terminal endpoints

1 participant