quarkusio/quarkus-quickstarts

ConfigMappings with single List of objects can't be processed

JoergStrebel opened this issue · 1 comments

Hallo!
I believe that I found a bug.

Quarkus: 3.8.2
Java: JDK 21
Maven: 3.9.6
GraalVM: - only JVM execution.

How to reproduce it:
I tested the usage of yaml configuration files with Quarkus 3.8.2 based on the source code in https://github.com/quarkusio/quarkus-quickstarts/tree/main/config-quickstart and https://quarkus.io/guides/config-yaml.
I am using the following application.yaml:

greeting:
  message: Hallo
  name: Jörg
country:
  - codes:
      - "cn"
      - "cn_vg"
    types:
      - CAR
  - codes:
      - "ab"
      - "cd"
    types:
      - MOTORCYCLE

I am using a @ConfigMapping(prefix="country").

What I am seeing:
If I run the program, quarkus cannot be started and emits an error message that the confguration in the application.yaml has no root. The symptoms are the same as in smallrye/smallrye-config#517

What I am expecting to see:
I would expect Quarkus to process the configuration and place the list below the "country" key into a Java List of interface type CountryConfiguration (which I will provide)

Could you please check whether a ConfigMapping with a single List of objects can be processed in Quarkus?

Closing as we already have: quarkusio/quarkus#39640