-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
Description
Description of the problem/issue
I have a String field annotated with @Schema and contains example text.
@Schema(description = "Primary street address or P.O. box",
requiredMode = Schema.RequiredMode.REQUIRED,
example = "123 Main St")
private String street1;In the generated JSON, the example shows as 123.
Affected Version
e.g. 2.8.15
Earliest version the bug appears in (if known):
Unknown
Steps to Reproduce
- Create a class with a String field
- Annotate it with
@Schemaand give example text beginning with numerals followed by plain text - Look at the generated JSON output
Expected Behavior
The example should have been "123 Main St"
Actual Behavior
The example was 123 as a number, sans the remaining text.
Logs / Stack Traces
Additional Context
Checklist
- I have searched the existing issues and this is not a duplicate.
- I have provided sufficient information for maintainers to reproduce the issue.
yht0827