swagger-codegen doesn't recognize option -packageName

1,372 views
Skip to first unread message

Manchun Zheng

unread,
Apr 24, 2017, 2:52:58 PM4/24/17
to Swagger
Hi, I'm new to swagger-codegen. And I'm trying to use it to generate a python client API for my server.
The default package name of the generated code is "swagger_client" and I would like to customize it.

I'm using v2.2.2.

$ swagger-codegen version

2.2.2



The help command tells me that I could use option "packageName".

$ swagger-codegen config-help -l python


CONFIG OPTIONS

packageName

    python package name (convention: snake_case). (Default: swagger_client)


packageVersion

    python package version. (Default: 1.0.0)


packageUrl

    python package URL.


sortParamsByRequiredFlag

    Sort method arguments to place required parameters before optional parameters. (Default: true)


hideGenerationTimestamp

    hides the timestamp when files were generated (Default: true)



But swagger doesn't like the option when I try it. 

$ swagger-codegen generate  -i client0.yaml -l python -o client -packageName my_client

Exception in thread "main" io.airlift.airline.ParseArgumentsUnexpectedException: Found unexpected parameters: [-packageName, my_client]

at io.airlift.airline.Cli.validate(Cli.java:148)

at io.airlift.airline.Cli.parse(Cli.java:116)

at io.airlift.airline.Cli.parse(Cli.java:97)

at io.swagger.codegen.SwaggerCodegen.main(SwaggerCodegen.java:41)


Do I miss anything here?

Thanks & Best Regards,
Manchun

Manchun Zheng

unread,
Apr 28, 2017, 6:56:42 PM4/28/17
to Swagger
Any suggestions about this issue?

Thanks,
Manchun

wing328

unread,
Jul 17, 2017, 1:31:56 PM7/17/17
to Swagger
Please open a ticket via https://github.com/swagger-api/swagger-codegen/issues/new (if you've not done so) so that the Swagger Codegen community can help you out.
Reply all
Reply to author
Forward
0 new messages