chore: add type to identity public api payload#4096
Open
joanagmaia wants to merge 1 commit intomainfrom
Open
Conversation
Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
Contributor
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the type attribute (e.g., username, email) to the public API’s member identity response payloads and aligns the OpenAPI MemberIdentity schema to require it, so API consumers can reliably distinguish identity kinds.
Changes:
- Updated
MemberIdentityOpenAPI schema to include requiredtypewith enum valuesusernameandemail. - Included
typein public API responses for creating, listing, and verifying member identities.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| backend/src/api/public/v1/members/identities/verifyMemberIdentity.ts | Adds type to the identity object returned from the verify/reject endpoint. |
| backend/src/api/public/v1/members/identities/getMemberIdentities.ts | Adds type to each identity in the list endpoint response. |
| backend/src/api/public/v1/members/identities/createMemberIdentity.ts | Adds type to the create identity endpoint response payload. |
| backend/src/api/public/openapi.yaml | Updates MemberIdentity schema to require and define the type field. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request adds support for a new identity attribute, type, to member identities. The type distinguishes between different forms of identity (such as username or email) and is now included in the API schema, as well as in the relevant API responses.
Schema and API changes:
OpenAPI schema updates:
openapi.yaml, with allowed values username and email, and included it in the list of required fields. [1] [2]API response updates:
createMemberIdentity.ts,getMemberIdentities.ts, andverifyMemberIdentity.tsto include the new type field in their returned data. [1] [2] [3]Note
Medium Risk
Adds a new required
typefield to the publicMemberIdentityschema and returns it from identity endpoints, which can be a breaking contract change for existing API consumers.Overview
Updates the public API contract for member identities by adding a required
typeattribute (enum:username|email) toMemberIdentityinopenapi.yaml.All member identity endpoints (
createMemberIdentity,getMemberIdentities,verifyMemberIdentity) now includetypein their response payloads to match the updated schema.Reviewed by Cursor Bugbot for commit 0e79e6f. Bugbot is set up for automated code reviews on this repo. Configure here.