feat: referer -> origin fallback - #76
Merged
Merged
Conversation
Signed-off-by: romanetar <roman_ag@hotmail.com>
smarcet
approved these changes
Jun 16, 2025
smarcet
added a commit
that referenced
this pull request
Jul 22, 2026
* feat: add fields/relations passthrough to GET /api/v1|v2/users/{id}
Wires SerializerUtils::getExpand()/getFields()/getRelations() into both
by-ID user endpoints (matching the ParametrizedGetAll pattern already
used by list endpoints), and makes PrivateUserSerializer treat `groups`
as a gated relation (mirroring ApiScopeGroupSerializer) instead of
appending it unconditionally.
Unblocks ftn-docsnsklz PR #76 (SDS ftn-attendee-native-realtime-comms.md,
D38): attendee-networking-api's IDP user_updated consumer needs to fetch
exactly fields=public_profile_allow_chat_with_me,first_name,last_name,pic
without pulling the rest of the private profile.
v1 get() also migrated from manual try/catch to the shared
processRequest() wrapper for consistent error handling with getV2().
Also fixes an unrelated pre-existing bug in UserLoginTurnstileTest where
$testEmail/$testPassword being typed as non-nullable string caused a
TypeError before the test's own markTestSkipped() logic could run when
TEST_USER_EMAIL/TEST_USER_PASSWORD are unset.
9 new tests added to OAuth2UserApiTest; full suite green (180 tests,
0 failures, 7 legitimate skips).
* docs(plan): mark spec as VERIFIED
* chore: untrack plan file — plan docs are working artifacts, not committed
* fix: document v1 expand param and add v1 default-shape regression test
Address deep-review findings on PR #148:
- OA\Get annotation for GET /api/v1/users/{id} was missing the `expand`
parameter even though get() already passed SerializerUtils::getExpand()
into serialize() -- the capability was live but undocumented.
- v1 lacked a default-shape regression test symmetric with
testGetUserByIdV2WithNoParamsReturnsSameShapeAsBefore, so the
fields/relations passthrough's backward compatibility on v1 was only
exercised incidentally.
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.
ref https://tipit.avaza.com/project/view#!tab=task-pane&groupby=MyTaskDueDate&view=vertical&task=3817599&stafilter=NotComplete&fileview=grid