Reputation: 79
I am using swaggerspring mvc -1.0.2 and jackson-databind 2.6.3.why it produce null value.how stop it?.it stopping swagger UI. JSON
{
"parameterType": {
"absoluteType": "array"
},
"name": "file",
"description": "Pass File as input",
"defaultValue": "",
"required": true,
"allowMultiple": false,
"allowableValues": null,
"paramType": "query",
"paramAccess": null
}
Upvotes: 1
Views: 962
Reputation: 6824
You need to configure your JSON mapper to not write null values:
And adding the specific serialization option is like such:
spring.jackson.serialization-inclusion:non_null
Upvotes: 1