Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API Support to Resolve Branding Preferences only using Published Preferences #637

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

dhaura
Copy link
Contributor

@dhaura dhaura commented Jul 29, 2024

Purpose

  • This PR introduces a new query parameter to the branding preference resolve GET endpoint, enabling the resolution of branding preferences using only published preferences.

  • By adding the restrictToPublished query parameter, users can specify whether to retrieve branding preferences only from published sources or from both published and unpublished preferences.

Example Usage:

curl --location '{base-url}/api/server/v1/branding-preference/resolve?locale={locale}&name={name}&type={branding-type}&restrictToPublished={true/false}' 

EX:

curl --location 'https://localhost:9443/t/carbon.super/api/server/v1/branding-preference/resolve?locale=en-US&name=e3548660-6ff9-4a39-acd6-d4071d6a6e69&type=APP&restrictToPublished=true' 

Parameter Behavior of restrictToPublished

  • true: Returns resolved branding preferences considering only published preferences.
  • false: Returns resolved branding preferences considering both published and unpublished preferences.
  • Not set: Defaults to false, considering both published and unpublished preferences.

When should this PR be merged

Related Issues

@@ -181,6 +181,7 @@ paths:
- $ref: '#/components/parameters/typeQueryParam'
- $ref: '#/components/parameters/nameQueryParam'
- $ref: '#/components/parameters/localeQueryParam'
- $ref: '#/components/parameters/restrictToPublishedQueryParam'
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to support this query param in branding-preference/text/resolve API as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fix for text customizations is tracked by wso2/product-is#20858

Copy link
Contributor

Choose a reason for hiding this comment

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

Please update the yaml in docs as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AnuradhaSK
AnuradhaSK previously approved these changes Aug 9, 2024
@jenkins-is-staging
Copy link

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

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10345827643
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/10345827643

@dhaura dhaura merged commit 48c9102 into wso2:master Aug 12, 2024
4 checks passed
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