By default, for "type": "boolean" in the JSON specification, Swagger will generate a Boolean field (object, not primitive, null) in the model. Is there a way to get Swagger to generate Boolean fields (primitive, not null) in models?
Rationale: Spring MVC is going to initialize these fields with null for invalid input, which is undesirable. Better save them with default values.
Same question with int vs Integer .
NB: Swagger has its own concept of "primitive" types, which is completely unrelated to Java primitives and is not what I am looking for.
source share