feat: add EL resolution for dynamic subscription form options - domai…#16065
Open
JedrzejJanasiak wants to merge 1 commit intomasterfrom
Open
feat: add EL resolution for dynamic subscription form options - domai…#16065JedrzejJanasiak wants to merge 1 commit intomasterfrom
JedrzejJanasiak wants to merge 1 commit intomasterfrom
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
8063362 to
8b03cb6
Compare
39aeb89 to
a20e4b7
Compare
dev-marek
requested changes
Mar 31, 2026
.../gravitee/apim/core/subscription_form/domain_service/SubscriptionFormConstraintsFactory.java
Outdated
Show resolved
Hide resolved
.../gravitee/apim/core/subscription_form/domain_service/SubscriptionFormConstraintsFactory.java
Outdated
Show resolved
Hide resolved
...rest-api-service/src/main/java/io/gravitee/apim/core/subscription_form/model/Constraint.java
Outdated
Show resolved
Hide resolved
...rest-api-service/src/main/java/io/gravitee/apim/core/subscription_form/model/Constraint.java
Outdated
Show resolved
Hide resolved
...apim/infra/domain_service/subscription_form/SubscriptionFormElResolverDomainServiceImpl.java
Outdated
Show resolved
Hide resolved
...apim/infra/domain_service/subscription_form/SubscriptionFormElResolverDomainServiceImpl.java
Outdated
Show resolved
Hide resolved
...ravitee/apim/infra/domain_service/subscription_form/SubscriptionFormSchemaGeneratorImpl.java
Outdated
Show resolved
Hide resolved
7e12ef3 to
c5f9223
Compare
dev-marek
requested changes
Apr 1, 2026
Contributor
dev-marek
left a comment
There was a problem hiding this comment.
some more mostly about styling
...rest-api-service/src/main/java/io/gravitee/apim/core/subscription_form/model/Constraint.java
Outdated
Show resolved
Hide resolved
...rest-api-service/src/main/java/io/gravitee/apim/core/subscription_form/model/Constraint.java
Outdated
Show resolved
Hide resolved
.../gravitee/apim/core/subscription_form/use_case/GetSubscriptionFormForEnvironmentUseCase.java
Show resolved
Hide resolved
...ain/java/io/gravitee/apim/core/subscription_form/use_case/UpdateSubscriptionFormUseCase.java
Outdated
Show resolved
Hide resolved
...apim/infra/domain_service/subscription_form/SubscriptionFormElResolverDomainServiceImpl.java
Outdated
Show resolved
Hide resolved
.../java/io/gravitee/rest/api/service/v4/impl/validation/SubscriptionValidationServiceImpl.java
Outdated
Show resolved
Hide resolved
...ravitee/apim/infra/domain_service/subscription_form/SubscriptionFormSchemaGeneratorImpl.java
Outdated
Show resolved
Hide resolved
...vitee/apim/core/subscription_form/domain_service/SubscriptionFormConstraintsFactoryTest.java
Outdated
Show resolved
Hide resolved
...vitee/apim/core/subscription_form/domain_service/SubscriptionFormConstraintsFactoryTest.java
Outdated
Show resolved
Hide resolved
...itee/apim/core/subscription_form/domain_service/SubscriptionFormSubmissionValidatorTest.java
Outdated
Show resolved
Hide resolved
…n layer Introduces SubscriptionFormElResolverDomainService with EL-based resolution of dynamic schema options and constraints, backed by API/environment metadata. Extends Constraint and SubscriptionFormSchema models with dynamic variants. Adds ApiMetadataQueryService#findApiMetadata and introduces no-context overloads that return fallbacks directly when no API context is available.
c5f9223 to
1d9181d
Compare
|
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.



Issue
https://gravitee.atlassian.net/browse/APIM-12990
Description
PR 1/2 — Domain & infrastructure layer for EL-based resolution of dynamic subscription form options.
This PR adds:
SubscriptionFormElResolverDomainServiceinterface withresolveSchemaOptionsandresolveConstraintsmethodsSubscriptionFormElResolverDomainServiceImpl— resolves EL expressions (e.g.${api.metadata['key']}:fallback) against API and environment metadata; falls back gracefully on resolution failureConstraintmodel extended withDynamicOneOf/DynamicEachOfvariants for EL-driven constraintsSubscriptionFormSchemaextended withDynamicOptionsAttributecarrying the raw EL expression and parsed fallback valuesSubscriptionFormConstraintsFactory—constraintsForbroken into focused private helpers to reduce cyclomatic complexity (Sonar)GetSubscriptionFormForEnvironmentUseCase.Inputmigrated to Lombok@BuilderApiMetadataQueryService#findEnvironmentMetadata— returns global/environment-level metadata without API overrides, used to populate EL template context when no API context is availableSubscriptionFormElResolverInMemory, updatedApiMetadataQueryServiceInMemoryNot in this PR (coming in PR 2/2):
/apis/{apiId}/subscription-form)Additional context
Previous in chain: #15918 (apim-12990-validation-resource — validation constraints at resource layer)