Skip to content

[BUG][JAVA][SPRING] Configuration Bean names collide #17737

@Tomschi

Description

@Tomschi

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Spring defaults to naming many beans by either class or method names. When using multiple openapi.yaml files (e.g. for a versioning strategy), these names can collide and fail start up.
In my case the occurrence of multiple EnumConverterConfiguration's produces the issue.

Suggest a fix

Change @configuration Annotation in converter.mustache fixes the issue:

@Configuration(value = "{{configPackage}}.enumConverterConfiguration")

Fix is implemented in PR: #17738

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions