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

config-metadata.json lacks configKey for ConfiguredProviders #8776

Closed
barchetta opened this issue May 17, 2024 · 2 comments · Fixed by #8891
Closed

config-metadata.json lacks configKey for ConfiguredProviders #8776

barchetta opened this issue May 17, 2024 · 2 comments · Fixed by #8891
Assignees
Labels
4.x Version 4.x bug Something isn't working config config-metadata P3

Comments

@barchetta
Copy link
Member

Environment Details

  • Helidon Version: 4.0.8

Problem Description

ConfiguredProvider defines a method configKey(). This key is not reflected anywhere in config-metadata.json

For example Http1ProtocolConfigProvider has a configKey of http_1_1. But the corresponding entry in config-metadata.json lacks that information:

  {
                "annotatedType": "io.helidon.webserver.http1.Http1Config",
                "type": "io.helidon.webserver.http1.Http1Config",
                "producers": [
                    "io.helidon.webserver.http1.Http1Config#create(io.helidon.common.config.Config)",
                    "io.helidon.webserver.http1.Http1Config#builder()"
                ],
                "provides": [
                    "io.helidon.webserver.spi.ProtocolConfig"
                ],
                "options": [
                 . . .
                ]
  }

Background

My assumption is that config-metadata.json provides the schema for module configuration. It should be possible to derive a skeleton application.yaml using only the information provided in config-metadata.json files. Currently that is not possible due to missing configKey

@tomas-langer
Copy link
Member

This should fix the problem:

@Prototype.Configured(root = false, value = "http_1_1")

@m0mus m0mus added bug Something isn't working P3 labels May 30, 2024
@tomas-langer
Copy link
Member

We should also add a validation that if the following annotations coexist:

@Prototype.Configured
@Prototype.Provides(ProtocolConfig.class)

an error is reported, as such a combination is expected to have a configuration key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working config config-metadata P3
Projects
Archived in project
4 participants