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

Enum values are not displayed in extension documentation #43307

Closed
wilvdb opened this issue Sep 16, 2024 · 5 comments · Fixed by #43633
Closed

Enum values are not displayed in extension documentation #43307

wilvdb opened this issue Sep 16, 2024 · 5 comments · Fixed by #43633
Assignees
Labels
area/documentation env/windows Impacts Windows machines kind/bug Something isn't working
Milestone

Comments

@wilvdb
Copy link

wilvdb commented Sep 16, 2024

Describe the bug

Enumeration values for configuration are not present in the generated documentation (asciidoc).

Expected behavior

File greeting-extension.adoc should contain configuration properties as below :

Configuration property Type Default
org.acme.style classico-classic, funky required

Actual behavior

File greeting-extension.adoc contains configuration properties as below (enumeration name is displayed instead of enum values) :

Configuration property Type Default
org.acme.style Style required

How to Reproduce?

Sample project is available here : https://github.com/wilvdb/greeting-extension

  1. mvn package
  2. check file content of : greeting-extension/target/asciidoc/generated/config/greeting-extension.adoc

Output of uname -a or ver

MINGW64_NT-10.0-19045 MC213429 3.3.3-341.x86_64 2022-01-17 11:45 UTC x86_64 Msys

Output of java -version

openjdk version "21.0.3" 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

Quarkus version or git rev

3.14.4

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.4 (dfbb324ad4a7c8fb0bf182e6d91b0ae20e3d2dd9) Maven home: C:\dev\apache-maven-3.9.4 Java version: 21.0.3, vendor: Eclipse Adoptium, runtime: C:\Program Files\Temurin Default locale: en_US, platform encoding: UTF-8 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Additional information

Generated model in runtime module contains the enumeration value:

configRoots:
- extension:
    groupId: "org.acme"
    artifactId: "greeting-extension"
    name: "Greeting Extension"
    nameSource: "EXTENSION_METADATA"
    detected: true
  prefix: "org.acme"
  topLevelPrefix: "org.acme"
  items:
  - !<io.quarkus.annotation.processor.documentation.config.model.ConfigProperty>
    enum: true
    sourceClass: "org.acme.greeting.extension.runtime.Config"
    sourceName: "style"
    path: "org.acme.style"
    type: "org.acme.greeting.extension.runtime.Config.Style"
    phase: "RUN_TIME"
    environmentVariable: "ORG_ACME_STYLE"
    typeDescription: "Style"
    converted: true
    enumAcceptedValues:
      qualifiedName: "org.acme.greeting.extension.runtime.Config.Style"
      values:
        CLASSICO_CLASSIC:
          configValue: "classico-classic"
        FUNKY:
          configValue: "funky"
  qualifiedNames:
  - "org.acme.greeting.extension.runtime.Config"
@wilvdb wilvdb added the kind/bug Something isn't working label Sep 16, 2024
@quarkus-bot quarkus-bot bot added env/windows Impacts Windows machines triage/needs-triage labels Sep 16, 2024
Copy link

quarkus-bot bot commented Sep 16, 2024

/cc @MichalMaler (documentation), @ebullient (documentation), @inoxx03 (documentation), @michelle-purcell (documentation), @rolfedh (documentation), @sheilamjones (documentation), @sunayna15 (documentation)

@wilvdb
Copy link
Author

wilvdb commented Sep 26, 2024

Is there something new regarding this issue ?

@gsmet
Copy link
Member

gsmet commented Oct 1, 2024

I'll have a look.

@gsmet
Copy link
Member

gsmet commented Oct 1, 2024

This was an oversight, sorry about this. It will be fixed by #43633 .

In passing, I don't think you need the converter? The values should be handled the way you want by default (which is fortunate as the config generation doesn't take the converters into account).

@gsmet
Copy link
Member

gsmet commented Oct 1, 2024

And thanks for the great reproducer, it was a great time saver :).

@gsmet gsmet closed this as completed in 7851e56 Oct 2, 2024
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Oct 2, 2024
@gsmet gsmet modified the milestones: 3.16.0.CR1, 3.15.2 Oct 21, 2024
gsmet added a commit to gsmet/quarkus that referenced this issue Oct 21, 2024
bschuhmann pushed a commit to bschuhmann/quarkus that referenced this issue Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation env/windows Impacts Windows machines kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants