You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "openapi_python_client/parser/properties/__init__.py", line 545, in build_schemas
schemas_or_err = update_schemas_with_data(name, data, schemas)
File "openapi_python_client/parser/properties/__init__.py", line 521, in update_schemas_with_data
prop, schemas = build_model_property(data=data, name=name, schemas=schemas, required=True, parent_name=None)
File "openapi_python_client/parser/properties/__init__.py", line 261, in build_model_property
prop, schemas = property_from_data(
File "openapi_python_client/parser/properties/__init__.py", line 509, in property_from_data
return _property_from_data(name=name, required=required, data=data, schemas=schemas, parent_name=parent_name)
File "openapi_python_client/parser/properties/__init__.py", line 453, in _property_from_data
return build_enum_property(
File "openapi_python_client/parser/properties/__init__.py", line 343, in build_enum_property
values = EnumProperty.values_from_list(enum)
File "openapi_python_client/parser/properties/enum_property.py", line 62, in values_from_list
if value[0].isalpha():
TypeError: 'NoneType' object is not subscriptable
While it doesn't seem like a very standard practice, I don't see anything in OpenAPI against it, and other code generators choose to support it (e.g. lukeautry/tsoa#468).
Ah, interesting bug. We do this to determine whether we should be making a str, Enum or an IntEnum in the generated code. Looks like we need a special case for the empty string included in there. Thanks for reporting!
Hey there, thanks for the nifty tool!
Something like
currently breaks openapi-python-client with
While it doesn't seem like a very standard practice, I don't see anything in OpenAPI against it, and other code generators choose to support it (e.g. lukeautry/tsoa#468).
OpenAPI Spec File
https://github.com/drakkan/sftpgo/blob/main/httpd/schema/openapi.yaml
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: