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

4.x Generated config metadata for an enum on a @Prototype.Configured type does not list the valid values #9036

Closed
tjquinno opened this issue Jul 24, 2024 · 1 comment · Fixed by #9053
Assignees
Labels
4.x Version 4.x bug Something isn't working config-metadata
Milestone

Comments

@tjquinno
Copy link
Member

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP both
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

The generated config metadata JSON does not list the allowed values for an enum property.

Steps to reproduce

  1. Create a new public enum type (such as GcTimeType in this PR MP Metrics 5.1 support #9032).

  2. On a @Prototype.Configured type (MetricsConfigBlueprint in the PR) add a property of that enum type:

     @Option.Configured
     @Option.Default("COUNTER")
     GcTimeType gcTimeType();
  3. Build the component.

  4. Inspect the generated META-INF/helidon/config-metadata.json file. It describes the enum property but does not list allowed values.

@tjquinno tjquinno added bug Something isn't working 4.x Version 4.x config-metadata labels Jul 24, 2024
@tjquinno tjquinno added this to the 4.1.0 milestone Jul 24, 2024
@tomas-langer
Copy link
Member

It would be also good to make sure the allowed values are visible in the generated .adoc file with the javadoc.
Javadoc is only available in case the enum is in the same module as the Blueprint.
In case you need to use an enum from another module, you can add @Option.AllowedValues to describe each value.
Another nice to have would be to have a link to javadoc of the enum (esp. if from another module), so the user can see the values and descriptions.

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-metadata
Projects
Archived in project
2 participants