Skip to content

Setting oauth2RedirectUrl does not respect relaxed binding #591

Closed
@maciejwalkowiak

Description

@maciejwalkowiak

Describe the bug

Setting property springdoc.swagger-ui.oauth2-redirect-url does not work.

Expected behavior

Setting property springdoc.swagger-ui.oauth2-redirect-url should have exactly same result as setting springdoc.swagger-ui.oauth2RedirectUrl.

Additional context

springdoc.swagger-ui.oauth2RedirectUrl maps to SwaggerUiConfigProperties#oauth2RedirectUrl where SwaggerUiConfigProperties is a Spring Boot @ConfigurationProperties class. @ConfigurationProperties classes support relaxed binding, meaning properties can be set by one of:

  • springdoc.swagger-ui.oauth2RedirectUrl
  • springdoc.swagger-ui.oauth2-redirect-url

The latter is syntax that is generated by spring-boot-configuration-processor from Spring Boot, thus it's the syntax that will be autocompleted in IDEs supporting spring-configuration-metadata.json files.

Springdoc refers to this property springdoc.swagger-ui.oauth2RedirectUrl through @Value annotation in AbstractSwaggerWelcome ignoring the same time possibility to set same property through springdoc.swagger-ui.oauth2-redirect-url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions