Skip to content

Conversation

@NutharaNR
Copy link
Contributor

@NutharaNR NutharaNR commented Aug 13, 2025

Purpose

Fix the issue of GET /api/server/v1/configs/schemas/ API endpoint not returning custom and system SCIM schemas. This change also fixes GET /api/server/v1/configs/schemas/{schema-id} endpoint.

Approach

Instead of loading schema information from schemas.xml (as done currently), retrieve it from the claim management service. Four schemas; core, user, enterprise, and system are fixed, while the custom schema is dynamic and updated whenever a new attribute mapping is added.
The schema map is monitored for changes to the custom schema, and updates are applied accordingly when one of the endpoints are called.

Related

Endpoint results after fix

GET /api/server/v1/configs/schemas

image

GET /api/server/v1/configs/schemas/{schema_id}

image

@wso2-engineering-bot
Copy link

AI Agent Log Improvement Checklist

⚠️ Warning: AI-Generated Review Comments

  • The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
  • Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.

✅ Before merging this pull request:

  • Review all AI-generated comments for accuracy and relevance.
  • Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
Comment Accepted (Y/N) Reason
#### Log Improvement Suggestion No: 1
#### Log Improvement Suggestion No: 2
#### Log Improvement Suggestion No: 3
#### Log Improvement Suggestion No: 4
#### Log Improvement Suggestion No: 5
#### Log Improvement Suggestion No: 6
#### Log Improvement Suggestion No: 7
#### Log Improvement Suggestion No: 8

@Malith-19 Malith-19 requested a review from Copilot August 13, 2025 05:02
Copy link
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

This PR fixes the issue where the /api/server/v1/configs/schemas/ API endpoint was not returning custom and system SCIM schemas. The solution replaces the XML-based schema loading with dynamic retrieval from the claim management service.

  • Replaces XML file parsing with claim management service integration for schema retrieval
  • Adds dynamic monitoring and updating of custom schema attributes
  • Implements proper schema mapping for core, user, enterprise, system, and custom SCIM schemas

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
SchemaConfigParser.java Refactored to retrieve schemas from claim management service instead of XML parsing, added dynamic custom schema monitoring
ConfigsServiceHolder.java Added claim metadata management service integration and external claims retrieval method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/16932014927

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/16932014927
Status: failure

@NutharaNR
Copy link
Contributor Author

Integration Test Runner

sadilchamishka
sadilchamishka previously approved these changes Aug 18, 2025
@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/17033948831

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/17033948831
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/17033948831

@sadilchamishka sadilchamishka merged commit 3ee76a7 into wso2:master Aug 21, 2025
4 checks passed
@NutharaNR NutharaNR deleted the schemas-get-api-bug-fix branch August 26, 2025 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

5 participants