swagger-codegen
swagger-codegen copied to clipboard
[cpprest] Bug: using multipart/form-data without files leads application/x-www-form-urlencoded falsely being used
Description
When using multipart/form-data as content type without files the generated code instead uses content type application/x-www-form-urlencoded:
https://github.com/cipold/swagger-codegen/blob/master/samples/client/petstore/cpprest/ApiClient.cpp#L108
Swagger-codegen version
master / 2.4.11-SNAPSHOT
Swagger declaration file content or url
modules/swagger-codegen/src/test/resources/2_0/petstore.yaml
Command line used for generation
./run-in-docker.sh generate -t modules/swagger-codegen/src/main/resources/cpprest -i modules/swagger-codegen/src/test/resources/2_0/petstore.yaml -l cpprest -o samples/client/petstore/cpprest
Steps to reproduce
- Run the command line
- See defective generated example file
Suggest a fix/enhancement
I will submit a PR fixing the issue