Handle "empty" default values as null
Describe the bug
"empty" default values for optional fields throw an error. swagger-parser explicitly allows these (even though they are technically out-of-spec) by converting them silently to null. So, there exist openapi json in the wild built by swagger tools that pass swagger validation, but throw an error here in openapi-python-client.
OpenAPI Spec File https://www.marinespecies.org/rest/api-docs/openapi.yaml
grep for:
schema:
type: integer
default: ""
There are three endpoints that have this property. One of which is AphiaTaxonRanksByID. It might be useful to check this endpoint out in the swagger docs here.
Desktop (please complete the following information):
- openapi-python-client version 0.28.0
Additional context I am in contact with the folks at WORMS to try and find out how their openapi.yaml got this way. Will update here when I get more info.
I have since raised a bug with the folks at WORMS and they have fixed this out-of-spec error. So, my particular use case is moot. Happy to just close this if y'all aren't interested in it.