@@ -46,15 +46,86 @@ paths:
4646 # ──────────────────────────────────────────────
4747 # Members
4848 # ──────────────────────────────────────────────
49+ /members :
50+ post :
51+ operationId : createMember
52+ summary : Create a member profile
53+ description : >
54+ Create a new member profile in CDP with one or more identities.
55+ tags :
56+ - Members
57+ security :
58+ - OAuth2Bearer :
59+ - write:members
60+ requestBody :
61+ required : true
62+ content :
63+ application/json :
64+ schema :
65+ type : object
66+ required :
67+ - displayName
68+ - identities
69+ properties :
70+ displayName :
71+ type : string
72+ minLength : 1
73+ description : Display name for the member profile.
74+ identities :
75+ type : array
76+ minItems : 1
77+ description : Initial identities for the member.
78+ items :
79+ $ref : ' #/components/schemas/MemberIdentityInput'
80+ example :
81+ displayName : Jane Doe
82+ identities :
83+ - value : abc123
84+ platform : lfid
85+ type : username
86+ source : lfxOne
87+ verified : true
88+ verifiedBy : jane@lfx.dev
89+ responses :
90+ ' 201 ' :
91+ description : Member created successfully.
92+ content :
93+ application/json :
94+ schema :
95+ type : object
96+ required :
97+ - memberId
98+ properties :
99+ memberId :
100+ type : string
101+ format : uuid
102+ example :
103+ memberId : 550e8400-e29b-41d4-a716-446655440000
104+ ' 400 ' :
105+ $ref : ' #/components/responses/BadRequest'
106+ ' 401 ' :
107+ $ref : ' #/components/responses/Unauthorized'
108+ ' 403 ' :
109+ $ref : ' #/components/responses/Forbidden'
110+ ' 409 ' :
111+ description : Identity already exists on another member.
112+ content :
113+ application/json :
114+ schema :
115+ $ref : ' #/components/schemas/HttpError'
116+ example :
117+ error :
118+ code : CONFLICT
119+ message : Identity already exists on another member
120+
49121 /members/resolve :
50122 post :
51123 operationId : resolveMember
52124 summary : Resolve a CDP member profile
53125 description : >
54- Resolve a `memberId` from one or more identities. LFX One should always
55- call this first to obtain the CDP member ID before using other endpoints.
56- Returns 404 if no matching profile exists, or 409 if the provided
57- identities belong to different profiles.
126+ Resolve memberId from identities. LFX One should always make a first
127+ request to this API to retrieve the corresponding memberId from CDP.
128+ If a member is found, use it. If not, create a member.
58129 tags :
59130 - Members
60131 security :
@@ -107,7 +178,7 @@ paths:
107178 ' 403 ' :
108179 $ref : ' #/components/responses/Forbidden'
109180 ' 404 ' :
110- description : No matching member profile found.
181+ description : Profile not found.
111182 content :
112183 application/json :
113184 schema :
@@ -117,15 +188,15 @@ paths:
117188 code : NOT_FOUND
118189 message : Member not found
119190 ' 409 ' :
120- description : The provided identities belong to different member profiles.
191+ description : Multiple member profiles matched .
121192 content :
122193 application/json :
123194 schema :
124195 $ref : ' #/components/schemas/HttpError'
125196 example :
126197 error :
127198 code : CONFLICT
128- message : Conflicting identities
199+ message : Multiple member profiles matched
129200
130201 # ──────────────────────────────────────────────
131202 # Member Identities
@@ -236,15 +307,15 @@ paths:
236307 ' 404 ' :
237308 $ref : ' #/components/responses/MemberNotFound'
238309 ' 409 ' :
239- description : Identity already exists on this member or is verified on another .
310+ description : Identity already exists on another member.
240311 content :
241312 application/json :
242313 schema :
243314 $ref : ' #/components/schemas/HttpError'
244315 example :
245316 error :
246317 code : CONFLICT
247- message : Identity already exists on this member
318+ message : Identity already exists on another member
248319
249320 /members/{memberId}/identities/{identityId} :
250321 patch :
@@ -320,15 +391,15 @@ paths:
320391 schema :
321392 $ref : ' #/components/schemas/HttpError'
322393 ' 409 ' :
323- description : Identity is already verified on another member.
394+ description : Identity already exists on another member.
324395 content :
325396 application/json :
326397 schema :
327398 $ref : ' #/components/schemas/HttpError'
328399 example :
329400 error :
330401 code : CONFLICT
331- message : Identity already verified on another member
402+ message : Identity already exists on another member
332403
333404 # ──────────────────────────────────────────────
334405 # Maintainer Roles
@@ -972,6 +1043,7 @@ components:
9721043 tokenUrl : https://linuxfoundation.auth0.com/oauth/token
9731044 scopes :
9741045 read:members : Read member profiles
1046+ write:members : Create member profiles
9751047 read:member-identities : Read member identities
9761048 write:member-identities : Create and verify member identities
9771049 read:maintainer-roles : Read maintainer roles
@@ -1008,6 +1080,40 @@ components:
10081080 format : uuid
10091081
10101082 schemas :
1083+ MemberIdentityInput :
1084+ type : object
1085+ required :
1086+ - value
1087+ - platform
1088+ - type
1089+ - source
1090+ - verified
1091+ properties :
1092+ value :
1093+ type : string
1094+ minLength : 1
1095+ description : Identity value (e.g. username, email address).
1096+ platform :
1097+ type : string
1098+ minLength : 1
1099+ description : Platform name (e.g. github, lfid).
1100+ type :
1101+ type : string
1102+ enum :
1103+ - username
1104+ - email
1105+ description : Identity type.
1106+ source :
1107+ type : string
1108+ minLength : 1
1109+ description : Source system that created this identity.
1110+ verified :
1111+ type : boolean
1112+ description : Whether the identity is verified.
1113+ verifiedBy :
1114+ type : string
1115+ description : Required when `verified` is true. Identifier of who verified.
1116+
10111117 MemberIdentity :
10121118 type : object
10131119 required :
0 commit comments