Skip to content

[cli] utility doesn't respect supportPython2 option #3951

@dkucsc

Description

@dkucsc
Description

I supply a filename to the swagger-cogegen-cli.jar generate --config option, and its contents is just {"supportPython2":"True"}. The filename ends with .json

I also specify the same command without specifying the --config option.

The problem is that the output stub servers from both commands produce seemingly the same output; the app.py file in both servers say Python 3 on the first line.

I even go to modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/FlaskConnexionCodegen.java and change the default value on line 119 from "false" to "true", run "mvn clean package", call the produced jar file at ./modules/swagger-codegen-cli/target/swagger-codegen-cli.jar in the same ways as before, and there still doesn't seem to be a difference.

This is the exact command I'm running:

java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate -c temp.json -i schemas/target/swagger/ga4gh/all_services.swagger.json -l python-flask -o server

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions