Repository navigation
fix(api): Circles.list() unwraps the data envelope; Circles.new() sends tag/parents - #66
Merged
Merged
Conversation
…ds tag/parents
Circles.list() looked up a "circles" envelope key the API never
sends; the list endpoints return {"data": [...]} (assignments,
submissions, timetable all do). Unwrap "data" instead.
Circles.new() accepted tag/parents but built the POST payload from
name/description only, silently dropping them. Send tag and parents
(now only when provided), and default description to "" to match the
API, where description is optional (nyjc-computing/campus#763).
Fixes #55.
Contributor
Author
|
Dev E2E verification (nyjc-computing/campus#762 sweep), driven end-to-end through this branch's client against https://campusapi-development.up.railway.app (deploy a5bf25e, campus phases 1–2 live) — 8/8 checks passed: Notes:
|
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.
Fixes #55 (both defects).
Changes
Circles.list()unwraps["data"]— the API's list endpoints return a{"data": [...]}envelope (assignments, submissions, timetable all do); the client looked up a"circles"key that is never sent.Circles.new()now sendstagandparentsin the POST payload (parentsonly when provided) — previously both parameters were silently dropped, so created circles never carried them.descriptionnow defaults to""to match the API, where it is optional server-side (fix(circles): @meta filter in list(), 409 on missing-circle delete (#760) campus#763 made it default"").tests/unit/test_circles.py: envelope unwrap + payload-carries-tag/parents regressions, in the existing mock-client style.Notes
CircleMemberssub-resource defects (wrong endpoints, flat-mapping unwrap) are not touched here — they are fix(api): CircleMembers add/remove target the wrong endpoints; members.list() unwraps a key the API does not send #42.Verification
poetry run pytest: 118 passed (4 new).ruff checkon changed files: clean.