Update Swagger Specification with nullable fields
I am trying to use the api with swagger generated client, but getting errors.
- Client wants to create a tool via POST on tools-services
- minimum set of attributes needed is (label, description) pair for adding a new tool. However, the ToolDto doesn’t explicitly specify other attributes as ‘nullable’, which results in error below:
“Invalid type for variable ‘source’. Required value type is SourceBasicDto and passed type was NoneType at [‘received_data’][‘source’]”
I think either swagger spec should mark such attributes as nullable or null check should be done on the server side and response to the client accordingly, if those attributes are required