I am using microservice architecture, where all my open API s are stored in a git Hub repo. After adding the dependency with those YAML files, when I generate a API payload using JAVA, it s showing NULL values for optional parameters.
For example
Payload Generated { "userName": "XXXXX", "dateOfBirth": "NULL", "placeOfBirth": "Vegas", "cityOfResidence": "NULL" }
Payload Expected
{ "userName": "XXXXX", "placeOfBirth": "Vegas", } Note: The field "dataofBirth" & "cityOfResidence" is declared in open API specification as "required": FALSE
So question is how can we make it as "Payload Expected". Is it any change do be done at YAML or to be handled at code level?