spring-cloud / spring-cloud/spring-cloud-gateway
Missing configuration metadata in Gateway MVC
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Describe the bug
The configuration properties in the spring.cloud.gateway.mvc.routes-map group are missing metadata, resulting in IDEs not being able to validate values or suggest completions. It looks like something related to the fact that it's defined as a Map and includes an object which is defined in another class, not nested. The latter scenario would be typically solved with the @NestedConfigurationProperty annotation, but it doesn't support Maps. On the other hand, the spring.cloud.gateway.mvc.routes group (defined as a List) comes with the right metadata.
A possible solution would be to add the metadata explicitly in a additional-spring-configuration-metadata.json file. I'm not sure if there's some way in Spring Boot to support this scenario automatically via the Configuration Processor.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Gateway MVC configuration that defines the spring.cloud.gateway.mvc.routes-map group and compare its generated metadata with the spring.cloud.gateway.mvc.routes group. Check whether the Spring Boot configuration processor supports this Map case or whether additional-spring-configuration-metadata.json is needed. Done means IDE validation and completion work for the routes-map properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100