-
Notifications
You must be signed in to change notification settings - Fork 128
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
[BUG]Multipart/form-data request is not working, with swagger: 2.0 #726
Comments
@linbintie I faced the same issue. I think it's because the isMultipart boolean value is set based on the requestBody here: swagger-dart-code-generator/lib/src/swagger_models/requests/swagger_request.dart Line 120 in 2a5d673
I was able to fix it by changing to the OpenAPI 3.0 spec which would have requestBody instead of consumes. |
sorry, |
Hi @linbintie , we can create workaround for you. Just let us know, what is expected generated code looks like |
Thanks, @Vovanella95
it can work very well. |
Hi @linbintie , It's Chopper generated code, We can not generate it. We generate only .swagger.dart files. Can we generate swagger.dart file somehow for you? |
@Vovanella95 |
@linbintie could you provide expected generated .swagger.dart file? Sorry I do not have experience with multipart :) |
@Vovanella95 this is .swagger.dart file:
|
Hi @linbintie , you provided swagger file. I asked for expected generated .swagger.dart file)) Sorry for misunderstanding))) |
like this code?
|
Hi @linbintie , yes, it's good! Thanks a lot! Will try to handle it asap |
@Vovanella95 |
Hi guys!
Library version used:
swagger_dart_code_generator: ^2.15.0
Describe the bug
We are generating our current specification and some of the services are not properly generated. All of the multipart/form-data services are being created as common https://github.com/post calls without any @partfile attributes, leading us on not being able to use the generator for those services. Our spec is attached for your references (using OpenAPI 2.0).
gen code:
The generated code is wrong
Are we missing something?
The text was updated successfully, but these errors were encountered: