Skip to content

Config prefix from extension refrence issues in YAML #47664

@GregJohnStewart

Description

@GregJohnStewart

Describe the bug

In my extension, I have made configuration objects prefixed by "oqm.core.api", which seems to work fine as intended. In my consuming app, I use yaml. It seems that when using yaml, the structure is not setup as intended; instead of the expected:

oqm:
  core:
    api:
      # ...

I instead have to use:

oqm.core.api:
  # ...

This is despite the fact that Intellij linting seems to pick on the structured form in the provided hints (Intellij hints that the expected, object based setup should be what works).

When setting values using the expected form, an error along the lines of "the config root could not be found" occurs

Expected behavior

The configuration whould work as a nested object (the intuitive/ expected result), instead of the prefix itself as the root key.

Actual behavior

When setting values using the expected form, an error along the lines of "the config root could not be found" occurs

How to Reproduce?

Code locations:

You can reproduce by ./mvnw install on the extension, then ./gradlew test on the consuming app.

Output of uname -a or ver

Linux oqm-dev 6.8.0-59-generic #61~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 15 17:03:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "21.0.6" 2025-01-21 OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-122.04.1) OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-122.04.1, mixed mode, sharing)

Quarkus version or git rev

Both ext/app on 3.22.1

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

Extension: Apache Maven 3.6.3 / Consuming app Gradle: 8.5

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions