springdoc-openapi icon indicating copy to clipboard operation
springdoc-openapi copied to clipboard

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

Open ianwallen opened this issue 1 month ago • 0 comments

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

ianwallen avatar Dec 05 '25 23:12 ianwallen