swagger-codegen generates python client in 'SwaggerPetstore-python' directory ?

1,065 views
Skip to first unread message

swaguser

unread,
Jun 9, 2015, 3:59:52 PM6/9/15
to swagger-sw...@googlegroups.com
I'm using swagger-codegen 2.1.2 to generate python client from my custom swagger.json definition. It appears the client is generated in clients/python/SwaggerPetstore-python/SwaggerPetstore/ directory. I haven't noticed the "SwaggerPetstore" part before upgrading to 2.1.2 -- is this an issue or some default that can be overwritten ?

This is the command I use:

 java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
   
-i ~/host/svn/software/manager/voyager/docs/swagger/swagger.json  \
   
-l python \
   
-o clients/python

mission liao

unread,
Jun 11, 2015, 1:01:03 PM6/11/15
to swagger-sw...@googlegroups.com
There are tools that dynamically generate client code in python.
If you get stuck in code-gen, check this list http://swagger.io/open-source-integrations/ and give anyone of them a try.

swaguser於 2015年6月10日星期三 UTC+8上午3時59分52秒寫道:

swaguser

unread,
Jun 11, 2015, 1:08:29 PM6/11/15
to swagger-sw...@googlegroups.com
I have no issues generating a python client. My question is about the directory name that is used -- "SwaggerPetstore". I'm using my own swagger.json that has nothing to do with the example petstore spec, so I think it's not generated correctly or perhaps some default is not being changed. 

Ron Ratovsky

unread,
Jun 11, 2015, 1:20:37 PM6/11/15
to swagger-sw...@googlegroups.com
Please open an issue on the project for that and it should be fixed.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

swaguser

unread,
Jun 11, 2015, 1:35:41 PM6/11/15
to swagger-sw...@googlegroups.com
Thanks for confirming. Issue #860


On Thursday, June 11, 2015 at 10:20:37 AM UTC-7, Ron wrote:
Please open an issue on the project for that and it should be fixed.
On Thu, Jun 11, 2015 at 1:08 PM, swaguser <yu...@zatsweb.com> wrote:
I have no issues generating a python client. My question is about the directory name that is used -- "SwaggerPetstore". I'm using my own swagger.json that has nothing to do with the example petstore spec, so I think it's not generated correctly or perhaps some default is not being changed. 


On Thursday, June 11, 2015 at 10:01:03 AM UTC-7, mission liao wrote:
There are tools that dynamically generate client code in python.
If you get stuck in code-gen, check this list http://swagger.io/open-source-integrations/ and give anyone of them a try.

swaguser於 2015年6月10日星期三 UTC+8上午3時59分52秒寫道:
I'm using swagger-codegen 2.1.2 to generate python client from my custom swagger.json definition. It appears the client is generated in clients/python/SwaggerPetstore-python/SwaggerPetstore/ directory. I haven't noticed the "SwaggerPetstore" part before upgrading to 2.1.2 -- is this an issue or some default that can be overwritten ?

This is the command I use:

 java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
   
-i ~/host/svn/software/manager/voyager/docs/swagger/swagger.json  \
   
-l python \
   
-o clients/python

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Xiwen Cheng

unread,
Jun 14, 2015, 3:36:30 AM6/14/15
to swagger-sw...@googlegroups.com
Did you try supplying configuration to the generator?

swagger config-help -l python   

CONFIG OPTIONS
    modelPackage
        package for generated models

    apiPackage
        package for generated api classes

Take a look at the README for more info: https://github.com/swagger-api/swagger-codegen
Reply all
Reply to author
Forward
0 new messages