-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Milestone
Description
Description
swagger-codegen produces such a code in API call methods:
var contentTypes = ['application/json; charset=utf-8'];
var accepts = ['application/json; charset=utf-8'];The expected code is:
var contentTypes = ['application/json; charset=utf-8'];
var accepts = ['application/json; charset=utf-8'];The part of spec source is:
consumes:
- "application/json; charset=utf-8"
produces:
- "application/json; charset=utf-8"Swagger-codegen version
Latest master. Not sure if it is a regression.
Swagger declaration file content or url
https://gist.github.com/arikon/2f078fcf15aae07984c7e1d35def90bf
Command line used for generation
SWAGGER_JSON=swagger-new.json
SWAGGER_OUTPUT=sandbox-json-api
export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
export PATH=${JAVA_HOME}/bin:$PATH
java -jar swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
-i ${SWAGGER_JSON} \
-l javascript \
-o ${SWAGGER_OUTPUT} \
--additional-properties usePromises=true