[
https://issues.apache.org/jira/browse/SLING-11383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551517#comment-17551517
]
Dirk Rudolph commented on SLING-11383:
--------------------------------------
Wouldn't it be simple as taking the validation mode from the
FactoryConfigurationDescription and if not set falling back to the one defined
for the ConfigurationApi? This would be the same pattern that I see in the
[ConfigurationValidator|https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/blob/4f871d436dd3f8b500f0f690342d8e3b7e7c5897/src/main/java/org/apache/sling/feature/extension/apiregions/api/config/validation/ConfigurationValidator.java#L103],
or am I missing something here?
> Configuration API validation fails for internal names with LENIENT mode
> -----------------------------------------------------------------------
>
> Key: SLING-11383
> URL: https://issues.apache.org/jira/browse/SLING-11383
> Project: Sling
> Issue Type: Bug
> Components: Feature Model Analyser
> Affects Versions: Feature Model API Regions Extension 1.6.0
> Reporter: Dirk Rudolph
> Priority: Major
>
> Consider the following configuration-api
> {code}
> "configuration-api:JSON": {
> "factory-configurations": {
> "my.service.pid": {
> "mode": "LENIENT",
> "region": "GLOBAL",
> "internal-names": [
> "default"
> ]
> }
> }
> {code}
> As a user I would expect to get a warning when I have a configuration
> {{my.service.pid~default}} in my project, but the actual result is an error.
> {code}
> Configuration my.service.pid~default: Factory configuration with name is not
> allowed
> {code}
> The reason for that is that the
> [FeatureValidator|https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/blob/org.apache.sling.feature.extension.apiregions-1.6.0/src/main/java/org/apache/sling/feature/extension/apiregions/api/config/validation/FeatureValidator.java#L156]
> does not use the configuration description's validation mode but the one of
> the ConfigurationApi.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)