diff --git a/samples/petstore/python3/petstore/PetApi.py b/samples/client/petstore/python3/PetApi.py similarity index 100% rename from samples/petstore/python3/petstore/PetApi.py rename to samples/client/petstore/python3/PetApi.py diff --git a/samples/client/petstore/python3/Python3PetstoreCodegen.scala b/samples/client/petstore/python3/Python3PetstoreCodegen.scala new file mode 100644 index 00000000000..241eb734844 --- /dev/null +++ b/samples/client/petstore/python3/Python3PetstoreCodegen.scala @@ -0,0 +1,16 @@ +import com.wordnik.swagger.codegen.BasicPython3Generator + +import com.wordnik.swagger.core._ + +import java.io.File + +object Python3PetstoreCodegen extends BasicPython3Generator { + def main(args: Array[String]) = generateClient(args) + + override def destinationDir = "samples/client/petstore/python3" + + override def supportingFiles = List( + ("__init__.mustache", destinationDir, "__init__.py"), + ("swagger.mustache", destinationDir + File.separator + apiPackage.get, "swagger.py"), + ("__init__.mustache", destinationDir + File.separator + modelPackage.get, "__init__.py")) +} diff --git a/samples/petstore/python3/petstore/StoreApi.py b/samples/client/petstore/python3/StoreApi.py similarity index 100% rename from samples/petstore/python3/petstore/StoreApi.py rename to samples/client/petstore/python3/StoreApi.py diff --git a/samples/petstore/python3/petstore/UserApi.py b/samples/client/petstore/python3/UserApi.py similarity index 100% rename from samples/petstore/python3/petstore/UserApi.py rename to samples/client/petstore/python3/UserApi.py diff --git a/samples/petstore/python3/petstore/__init__.py b/samples/client/petstore/python3/__init__.py similarity index 100% rename from samples/petstore/python3/petstore/__init__.py rename to samples/client/petstore/python3/__init__.py diff --git a/samples/petstore/python3/petstore/models/Category.py b/samples/client/petstore/python3/models/Category.py similarity index 100% rename from samples/petstore/python3/petstore/models/Category.py rename to samples/client/petstore/python3/models/Category.py diff --git a/samples/petstore/python3/petstore/models/Order.py b/samples/client/petstore/python3/models/Order.py similarity index 100% rename from samples/petstore/python3/petstore/models/Order.py rename to samples/client/petstore/python3/models/Order.py diff --git a/samples/petstore/python3/petstore/models/Pet.py b/samples/client/petstore/python3/models/Pet.py similarity index 100% rename from samples/petstore/python3/petstore/models/Pet.py rename to samples/client/petstore/python3/models/Pet.py diff --git a/samples/petstore/python3/petstore/models/Tag.py b/samples/client/petstore/python3/models/Tag.py similarity index 100% rename from samples/petstore/python3/petstore/models/Tag.py rename to samples/client/petstore/python3/models/Tag.py diff --git a/samples/petstore/python3/petstore/models/User.py b/samples/client/petstore/python3/models/User.py similarity index 100% rename from samples/petstore/python3/petstore/models/User.py rename to samples/client/petstore/python3/models/User.py diff --git a/samples/petstore/python3/petstore/models/__init__.py b/samples/client/petstore/python3/models/__init__.py similarity index 100% rename from samples/petstore/python3/petstore/models/__init__.py rename to samples/client/petstore/python3/models/__init__.py diff --git a/samples/petstore/python3/petstore/swagger.py b/samples/client/petstore/python3/swagger.py similarity index 100% rename from samples/petstore/python3/petstore/swagger.py rename to samples/client/petstore/python3/swagger.py diff --git a/samples/petstore/python3/tests/BaseApiTest.py b/samples/client/petstore/python3/tests/BaseApiTest.py similarity index 100% rename from samples/petstore/python3/tests/BaseApiTest.py rename to samples/client/petstore/python3/tests/BaseApiTest.py diff --git a/samples/petstore/python3/tests/PetApiTest.py b/samples/client/petstore/python3/tests/PetApiTest.py similarity index 100% rename from samples/petstore/python3/tests/PetApiTest.py rename to samples/client/petstore/python3/tests/PetApiTest.py diff --git a/samples/petstore/python3/tests/StoreApiTest.py b/samples/client/petstore/python3/tests/StoreApiTest.py similarity index 100% rename from samples/petstore/python3/tests/StoreApiTest.py rename to samples/client/petstore/python3/tests/StoreApiTest.py diff --git a/samples/petstore/python3/tests/UserApiTest.py b/samples/client/petstore/python3/tests/UserApiTest.py similarity index 100% rename from samples/petstore/python3/tests/UserApiTest.py rename to samples/client/petstore/python3/tests/UserApiTest.py diff --git a/samples/petstore/python3/README.md b/samples/petstore/python3/README.md deleted file mode 100644 index b23858a872e..00000000000 --- a/samples/petstore/python3/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Sample Petstore Python 3 application - -Here's a Python 3.2 [Swagger](http://swagger.wordnik.com/) client with unit -tests for the Petstore sample application. See the interactive Swagger -documentation at http://petstore.swagger.wordnik.com/ for more information on -this demonstration API. - -The client contained in ```petstore``` was generated using this -```swagger-codegen``` project, with the following command: - - ./bin/runscala.sh com.wordnik.swagger.codegen.BasicPython3Generator http://petstore.swagger.wordnik.com/api/resources.json special-key - -To run the tests, issue a command like the following: - - python3.2 tests/BaseApiTest.py \ No newline at end of file