Skip to content

chore: add type to identity public api payload#4096

Open
joanagmaia wants to merge 1 commit intomainfrom
chore/add-type-to-identities-public-api
Open

chore: add type to identity public api payload#4096
joanagmaia wants to merge 1 commit intomainfrom
chore/add-type-to-identities-public-api

Conversation

@joanagmaia
Copy link
Copy Markdown
Contributor

@joanagmaia joanagmaia commented May 8, 2026

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:

  • Added a required type field to the identity schema in openapi.yaml, with allowed values username and email, and included it in the list of required fields. [1] [2]

API response updates:

  • Updated the response objects in createMemberIdentity.ts, getMemberIdentities.ts, and verifyMemberIdentity.ts to include the new type field in their returned data. [1] [2] [3]

Note

Medium Risk
Adds a new required type field to the public MemberIdentity schema 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 type attribute (enum: username | email) to MemberIdentity in openapi.yaml.

All member identity endpoints (createMemberIdentity, getMemberIdentities, verifyMemberIdentity) now include type in 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.

Signed-off-by: Joana Maia <jmaia@contractor.linuxfoundation.org>
@joanagmaia joanagmaia requested review from Copilot and skwowet May 8, 2026 16:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 MemberIdentity OpenAPI schema to include required type with enum values username and email.
  • Included type in 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.

Copy link
Copy Markdown
Collaborator

@skwowet skwowet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants