diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java index e5a3b0810b2..030e19c1a31 100755 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PythonClientCodegen.java @@ -82,14 +82,13 @@ public class PythonClientCodegen extends DefaultCodegen implements CodegenConfig additionalProperties.put("packageName", packageName); additionalProperties.put("packageVersion", packageVersion); - String baseFolder = packageName + "_python"; - String swaggerFoler = baseFolder + File.separatorChar + packageName; + String swaggerFoler = packageName; modelPackage = swaggerFoler + File.separatorChar + "models"; apiPackage = swaggerFoler + File.separatorChar + "apis"; - supportingFiles.add(new SupportingFile("README.mustache", baseFolder, "README.md")); - supportingFiles.add(new SupportingFile("setup.mustache", baseFolder, "setup.py")); + supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); + supportingFiles.add(new SupportingFile("setup.mustache", "", "setup.py")); supportingFiles.add(new SupportingFile("api_client.mustache", swaggerFoler, "api_client.py")); supportingFiles.add(new SupportingFile("rest.mustache", swaggerFoler, "rest.py")); supportingFiles.add(new SupportingFile("configuration.mustache", swaggerFoler, "configuration.py")); diff --git a/samples/client/petstore/python/swagger_client_python/Makefile b/samples/client/petstore/python/Makefile similarity index 100% rename from samples/client/petstore/python/swagger_client_python/Makefile rename to samples/client/petstore/python/Makefile diff --git a/samples/client/petstore/python/swagger_client_python/README.md b/samples/client/petstore/python/README.md similarity index 100% rename from samples/client/petstore/python/swagger_client_python/README.md rename to samples/client/petstore/python/README.md diff --git a/samples/client/petstore/python/swagger_client_python/dev-requirements.txt b/samples/client/petstore/python/dev-requirements.txt similarity index 100% rename from samples/client/petstore/python/swagger_client_python/dev-requirements.txt rename to samples/client/petstore/python/dev-requirements.txt diff --git a/samples/client/petstore/python/swagger_client_python/pom.xml b/samples/client/petstore/python/pom.xml similarity index 100% rename from samples/client/petstore/python/swagger_client_python/pom.xml rename to samples/client/petstore/python/pom.xml diff --git a/samples/client/petstore/python/swagger_client_python/setup.cfg b/samples/client/petstore/python/setup.cfg similarity index 100% rename from samples/client/petstore/python/swagger_client_python/setup.cfg rename to samples/client/petstore/python/setup.cfg diff --git a/samples/client/petstore/python/swagger_client_python/setup.py b/samples/client/petstore/python/setup.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/setup.py rename to samples/client/petstore/python/setup.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/__init__.py b/samples/client/petstore/python/swagger_client/__init__.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/__init__.py rename to samples/client/petstore/python/swagger_client/__init__.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/api_client.py b/samples/client/petstore/python/swagger_client/api_client.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/api_client.py rename to samples/client/petstore/python/swagger_client/api_client.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/apis/__init__.py b/samples/client/petstore/python/swagger_client/apis/__init__.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/apis/__init__.py rename to samples/client/petstore/python/swagger_client/apis/__init__.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/apis/pet_api.py rename to samples/client/petstore/python/swagger_client/apis/pet_api.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/apis/store_api.py rename to samples/client/petstore/python/swagger_client/apis/store_api.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/apis/user_api.py b/samples/client/petstore/python/swagger_client/apis/user_api.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/apis/user_api.py rename to samples/client/petstore/python/swagger_client/apis/user_api.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/configuration.py rename to samples/client/petstore/python/swagger_client/configuration.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/__init__.py b/samples/client/petstore/python/swagger_client/models/__init__.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/__init__.py rename to samples/client/petstore/python/swagger_client/models/__init__.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/category.py b/samples/client/petstore/python/swagger_client/models/category.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/category.py rename to samples/client/petstore/python/swagger_client/models/category.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/order.py b/samples/client/petstore/python/swagger_client/models/order.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/order.py rename to samples/client/petstore/python/swagger_client/models/order.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/pet.py b/samples/client/petstore/python/swagger_client/models/pet.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/pet.py rename to samples/client/petstore/python/swagger_client/models/pet.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/tag.py b/samples/client/petstore/python/swagger_client/models/tag.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/tag.py rename to samples/client/petstore/python/swagger_client/models/tag.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/models/user.py b/samples/client/petstore/python/swagger_client/models/user.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/models/user.py rename to samples/client/petstore/python/swagger_client/models/user.py diff --git a/samples/client/petstore/python/swagger_client_python/swagger_client/rest.py b/samples/client/petstore/python/swagger_client/rest.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/swagger_client/rest.py rename to samples/client/petstore/python/swagger_client/rest.py diff --git a/samples/client/petstore/python/swagger_client_python/testfiles/foo.png b/samples/client/petstore/python/testfiles/foo.png similarity index 100% rename from samples/client/petstore/python/swagger_client_python/testfiles/foo.png rename to samples/client/petstore/python/testfiles/foo.png diff --git a/samples/client/petstore/python/swagger_client_python/tests/__init__.py b/samples/client/petstore/python/tests/__init__.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/tests/__init__.py rename to samples/client/petstore/python/tests/__init__.py diff --git a/samples/client/petstore/python/swagger_client_python/tests/test_api_client.py b/samples/client/petstore/python/tests/test_api_client.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/tests/test_api_client.py rename to samples/client/petstore/python/tests/test_api_client.py diff --git a/samples/client/petstore/python/swagger_client_python/tests/test_api_exception.py b/samples/client/petstore/python/tests/test_api_exception.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/tests/test_api_exception.py rename to samples/client/petstore/python/tests/test_api_exception.py diff --git a/samples/client/petstore/python/swagger_client_python/tests/test_pet_api.py b/samples/client/petstore/python/tests/test_pet_api.py similarity index 100% rename from samples/client/petstore/python/swagger_client_python/tests/test_pet_api.py rename to samples/client/petstore/python/tests/test_pet_api.py diff --git a/samples/client/petstore/python/swagger_client_python/tox.ini b/samples/client/petstore/python/tox.ini similarity index 100% rename from samples/client/petstore/python/swagger_client_python/tox.ini rename to samples/client/petstore/python/tox.ini