feat: add endpoint to fetch singular org member#21732
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Documentation CheckNo Changes NeededThis PR adds a new API endpoint The PR includes proper OpenAPI annotations for the new No manual documentation changes are needed for this change. Automated review via Coder Tasks |
264ae77 to
d4b48a4
Compare
4f65740 to
a38c78e
Compare
d4b48a4 to
dfbd541
Compare
a38c78e to
42917cf
Compare
42917cf to
b61b050
Compare
Documentation CheckPrevious FeedbackThe previous review correctly noted that API documentation is auto-generated from OpenAPI annotations. Updates Needed
The // @Success 200 {object} codersdk.OrganizationMemberWithUserDataThis will ensure the auto-generated API documentation correctly shows the response format for the new Automated review via Coder Tasks |
b61b050 to
42917cf
Compare
Documentation CheckPrevious FeedbackNot yet addressed - the OpenAPI annotation issue identified in the previous review remains unfixed. Updates Needed
The // @Success 200 {object} codersdk.OrganizationMemberWithUserDataThis will ensure the auto-generated API documentation correctly shows the response format for the new Automated review via Coder Tasks |
42917cf to
f7c8acd
Compare
Documentation CheckPrevious FeedbackNot yet addressed - the OpenAPI annotation issue identified in previous reviews remains unfixed. Updates Needed
The // @Success 200 {object} codersdk.OrganizationMemberWithUserDataThis will ensure the auto-generated API documentation correctly shows the response format for the new Automated review via Coder Tasks |
f7c8acd to
da22b9c
Compare
Documentation CheckPrevious FeedbackNot yet addressed - the OpenAPI annotation issue identified in previous reviews remains unfixed in the latest commits. Updates Needed
The It should be: // @Success 200 {object} codersdk.OrganizationMemberWithUserDataThis will ensure the auto-generated API documentation in
After fixing the annotation, run Automated review via Coder Tasks |
da22b9c to
0d75983
Compare
Documentation CheckPrevious FeedbackNot yet addressed - the OpenAPI annotation issue identified in previous reviews remains unfixed. Updates Needed
The It should be: // @Success 200 {object} codersdk.OrganizationMemberWithUserDataThis will ensure the auto-generated API documentation correctly shows:
After fixing the annotation, run Automated review via Coder Tasks |
36f1eb9 to
ab7a276
Compare
johnstcn
left a comment
There was a problem hiding this comment.
LGTM once linter errors are fixed.
coderd/members_test.go
Outdated
| func TestGetMember(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| t.Run("Me", func(t *testing.T) { | ||
| t.Parallel() | ||
| owner := coderdtest.New(t, nil) | ||
| first := coderdtest.CreateFirstUser(t, owner) | ||
| ctx := testutil.Context(t, testutil.WaitMedium) | ||
|
|
||
| member, err := owner.OrganizationMember(ctx, first.OrganizationID.String(), codersdk.Me) | ||
| require.NoError(t, err) | ||
| require.Equal(t, member.UserID, first.UserID) |
There was a problem hiding this comment.
Could move this to TestAddMember or similar; a while coderdtest.New just for this seems a bit much.
38ce00f to
6021e9b
Compare
6021e9b to
7d2d291
Compare
Able to use idents like username, codersdk.Me, etc
7d2d291 to
dabb755
Compare

No description provided.