-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null enum defined incorrectly #1
Comments
potential related issue: tfranzel/drf-spectacular#235 Hi, thanks for bringing this to my attention, we used drf-spectacular to generate the openapi schema. Here is the openapi-generator command we used
NullEnum appears to be typeless in the schema so does that mean openapi-generator is giving a default type of string? regardless, I may be able to bypass this by setting |
Per https://github.com/NeuroVault/neurovault-python-sdk/blob/main/neurovault_sdk/model/null_enum.py#L28 |
Using the ENUM_ADD_EXPLICIT_BLANK_NULL_CHOICE also looks like a fine option. |
For this project, I'm trying to do minimal postprocessing of the schema and rely on third party tools to generate the schema and the subsequent SDK (less for me to maintain/break accidently)
🚀 🚀 I'll go with this option to see if it fixes the issue |
Sounds good. FYI, this may work as is in the future when swagger-api/swagger-parser#1792 is fixed |
@jdkent
Looking at https://github.com/NeuroVault/neurovault-python-sdk/blob/a089b149b364d6c5b3fb662854104173a87ad74f/docs/models/NullEnum.md it only allows string in but has an enum value of None.
You need to add nullable: true to that schema to have the None value pass type checking
The text was updated successfully, but these errors were encountered: