Skip to content

Inconsistent casing of swagger-config causes fetch error  #1277

Closed
@vchen8761

Description

@vchen8761

Describe the bug

  • When the default ObjectMapper uses UpperCamelCase strategy, the URL list in Swagger config has inconsistent property naming, which leads to a fetch error in the swagger-ui

To Reproduce
Steps to reproduce the behavior:

The issue needs to be reproduced with the following setups:

  • Actuator endpoints use a different port, so there is a URL list in swagger-config (for multiple Swagger definitions).
  • Default ObjectMapper of the SpringBoot project uses UpperCamelCase strategy other than default (lowerCamelCase or snake_case both work because the related field names are only 1-word long, i.e. url and name).

Expected behavior

  • No fetch error and actuator endpoints are listed in swagger-ui.html

Screenshots
Screenshot 2021-09-24 111230

See the screenshot above. On the right the items in urls has field names like Url and Name instead of url and name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions