-
-
Couldn't load subscription status.
- Fork 551
Description
Describe the bug
The type property of @Schema has no effect for objects in the "Schemas" section of the Swagger page.
To Reproduce
Can be reproduced by cloning this repository, running mvn spring-boot:run, and navigating to http://localhost:8081/swagger-ui.html.
The UserModel class is explicitly defined as type = "integer":
public class UserModel {
...
/** User's age */
@Schema(type = "integer", format = "int8")
private byte age;
}yet the default type (string for bytes in Java) is not overriden:
I've tested this with type = "integer" on both Java Strings and bytes, both with the same result.
Expected behavior
The integer type being applied to the field in Swagger.
Screenshots
See above
Additional context
Using SpringDocs 2.8.9 and Spring Boot 3.5.4 (see POM of linked repo reproducing issue for other version info).