Open RomainCendre opened 1 year ago
@property def profile_image(self) -> file:
Agreed it's a bug that should be fixed.
Ideally what should be used instead of file
for your use cases?
@wing328 Thanks for the answer. I should have said probably bytes, as the file was generated for taking care of blob? What do you think? Is there any quick fix that can be done in the openapi-generator project files ? EDIT: Looking at https://github.dev/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/python-flask, I still canot understand where file type is considered
Hi everyone, I'm using openapi generator to generate python-flask server for a few weeks, and I have had some concerns since I start using multipart/form-data with a blob. It seems to generate this kind of things :
@property def profile_image(self) -> file:
'file' is not defined, but yeah I never seen this kind of type in Python? Is that normal that 'file' is considered as a primitive type even in documentation? I will update the issue if it's a real concern, I'm not sure about it. Thanks a lottest.yaml:
Generation command:
openapi-generator_7.2.0.sh generate -i ./api/v1/test.yaml -g python-flask -o src/test --global-property skipFormModel=false
Run command:
python3 -m openapi_server