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).
Describe the bug
The
typeproperty of@Schemahas 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
UserModelclass is explicitly defined astype = "integer":yet the default type (
stringforbytes in Java) is not overriden:I've tested this with
type = "integer"on both JavaStrings andbytes, both with the same result.Expected behavior
The
integertype 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).