Skip to content

Annotation @ExampleObject does not apply message keys like other annotations. #3167

@ianwallen

Description

@ianwallen

Describe the bug

Annotation @ExampleObject does not apply message keys like other annotations.

To Reproduce

I create the following api with the annotations on the parameters.

 @Parameter(
                                                description = "messagekey",
                                                examples = {
                                                        @ExampleObject(
                                                                name = "messagekey",
                                                                summary = "messagekey",
                                                                value = "messagekey"
                                                        )

                                                }
                                        )

And I put the messagekeys in my locale resource

messagekey="Test message"

But the messagekeys are not replaced the in the @ExampleObject but it is for the description

Json looks like this
Image

Expected behavior

I expect the annotations to replace the message keys with the appropriate localization text which would be the same behavior as the other annotations.

Additional context
It is a similar issue to the following that was reported in the past #1355

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions