You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background
After upgrading swagger to 3.1 we face the issue that our schema annotations which have numbers in their examples gets interpreted as integers even though the type is a string.
Example
record TestDto (@Schema(example = "notANumber") String name, int age) {} //works perfectly fine
record TestDtoClone (@Schema(example = "1234", type = "string") String name, int age) {} //interpreted as integer even with type="string"
Background
After upgrading swagger to 3.1 we face the issue that our schema annotations which have numbers in their examples gets interpreted as integers even though the type is a string.
Example
I created a small demo project with a basic test:
https://github.com/EAlf91/swagger-issue/blob/main/src/test/java/org/example/MainTest.java
Expected Behaviour
String examples are correctly interpreted as string when typing is provided
The text was updated successfully, but these errors were encountered: