forked from loafle/openapi-generator-original
moved to client folder
This commit is contained in:
parent
155251951b
commit
f20748f0d5
16
samples/client/petstore/python3/Python3PetstoreCodegen.scala
Normal file
16
samples/client/petstore/python3/Python3PetstoreCodegen.scala
Normal file
@ -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"))
|
||||||
|
}
|
@ -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
|
|
Loading…
x
Reference in New Issue
Block a user