Describe the bug
When there's a model property with no type field, it causes a NoneProperty to be generated. I believe that according to JSONSchema, if there is no type specified, it should accept any type (though I'm not 100% sure; see conflicting answers in this thread https://stackoverflow.com/questions/29230349/is-type-optional-in-json-schema). It does seem more logical to compile to Any rather than None, since there's already type: null in JSONSchema.
To Reproduce
Add a model with a property with no type, such as:
Field:
type: object
properties:
value:
description: Field value
Expected behavior
Expected the generated field.py model to have value: Any.
OpenAPI Spec File
See above
Desktop (please complete the following information):
- OS: [e.g. macOS 10.15.1]
- Python Version: [e.g. 3.8.0]
- openapi-python-client version [e.g. 0.1.0]
Describe the bug
When there's a model property with no
typefield, it causes aNonePropertyto be generated. I believe that according to JSONSchema, if there is notypespecified, it should accept any type (though I'm not 100% sure; see conflicting answers in this thread https://stackoverflow.com/questions/29230349/is-type-optional-in-json-schema). It does seem more logical to compile toAnyrather thanNone, since there's alreadytype: nullin JSONSchema.To Reproduce
Add a model with a property with no type, such as:
Expected behavior
Expected the generated
field.pymodel to havevalue: Any.OpenAPI Spec File
See above
Desktop (please complete the following information):