moved to client folder

This commit is contained in:
Tony Tam 2012-09-23 18:40:47 -07:00
parent bab5973dd0
commit b6b80474b7
2 changed files with 17 additions and 1 deletions

View File

@ -3,4 +3,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export CLASSPATH="$DIR/../target/lib/*:$DIR/../target/*"
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/petstore/python/PythonPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key
scala $WORDNIK_OPTS $JAVA_CONFIG_OPTIONS -cp $CLASSPATH "$@" samples/client/petstore/python/PythonPetstoreCodegen.scala http://petstore.swagger.wordnik.com/api/resources.json special-key

View File

@ -0,0 +1,16 @@
import com.wordnik.swagger.codegen.BasicPythonGenerator
import com.wordnik.swagger.core._
import java.io.File
object PythonPetstoreCodegen extends BasicPythonGenerator {
def main(args: Array[String]) = generateClient(args)
override def destinationDir = "samples/petstore/python"
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"))
}