CEXT-6080: add conditional schema properties based on commerce flavor#418
Open
vinayrao2000 wants to merge 1 commit intoadobe:mainfrom
Open
CEXT-6080: add conditional schema properties based on commerce flavor#418vinayrao2000 wants to merge 1 commit intoadobe:mainfrom
vinayrao2000 wants to merge 1 commit intoadobe:mainfrom
Conversation
|
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.
Description
Enables flavor-aware configuration schema retrieval in App Management by forwarding the selected Commerce instance flavor (
paasorsaas) to app config endpoints.commerceEnvas a query parameter on the config GET requestuseGetConfigValues.fetchConfigto accept an optionalcommerceEnvand append it only when it strictly matches'paas'or'saas'useCommerceInstance()logic to derive flavor from the encoded instance ID (no new parsing logic introduced)useSetConfigValuesremains unchanged)As a result, apps using the Adobe Commerce SDK can return only the schema fields relevant to the selected flavor.
Motivation and Context
App configuration schemas were previously flavor-agnostic, causing users to see fields that were not relevant to their selected Commerce instance (PaaS or SaaS).
This change ensures that App Management forwards the correct flavor context to apps, enabling them to return filtered, environment-specific schema fields. This improves user experience and prevents confusion or misconfiguration.
How Has This Been Tested?
Added unit tests to verify:
paasandsaasvalues are correctly appendedundefined,'','unknown','PaaS') are ignoredconfigUrlare preservedUpdated integration test (
ConfigureApplication) to account for the newcommerceEnvargumentManual verification:
/env/paas→ request includescommerceEnv=paas/env/saas→ request includescommerceEnv=saasValidation:
tsc --noEmitpasseseslintpassesjesttests passingTypes of changes
Checklist: