Skip to content

@Tag name parameter not consistently performing lookup on properties file #1351

Closed
@ianwallen

Description

@ianwallen

Describe the bug
@tag name is being parsed differently depending on the parameters supplied to the annotation.

i.e.
In the unit test App14 (https://github.com/springdoc/springdoc-openapi/tree/master/springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app14)

@Tag(name = "greeting")
Produces the following in the unit test.
"tags":["Change the language","Hello! Welcome to our website!"]

But changing the @tag to include a description causes the name parameter to no longer load from properties file.
@Tag(name = "greeting", description = "greeting")
Produces
"tags":[{"name":"greeting","description":"greeting"}]

To Reproduce
Modify the following line in the unit test.

@Tag(name = "greeting", description = "greeting")

Run the test and check the body that was returned in the error message.

Expected behavior
I would expect that both Name and Description would have converted from the properties file to product "Hello! Welcome to our website!"
I also expect that adding a new parameter should not change the results of how the name parameter is loaded from the properties file.

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