openapi-generator/samples/client/petstore/objc/ObjcPetstoreCodegen.scala

30 lines
1003 B
Scala
Raw Normal View History

2012-09-25 05:55:17 +00:00
import com.wordnik.swagger.codegen.BasicObjcGenerator
import com.wordnik.swagger.core._
object ObjcPetstoreCodegen extends BasicObjcGenerator {
def main(args: Array[String]) = generateClient(args)
// template used for models
modelTemplateFiles += "model-header.mustache" -> ".h"
modelTemplateFiles += "model-body.mustache" -> ".m"
// template used for apis
apiTemplateFiles += "api-header.mustache" -> ".h"
apiTemplateFiles += "api-body.mustache" -> ".m"
// where to write generated code
override def destinationDir = "samples/client/petstore/objc"
// supporting classes
override def supportingFiles =
List(
("NIKSwaggerObject.h", destinationDir, "NIKSwaggerObject.h"),
("NIKSwaggerObject.m", destinationDir, "NIKSwaggerObject.m"),
("NIKApiInvoker.h", destinationDir, "NIKApiInvoker.h"),
("NIKApiInvoker.m", destinationDir, "NIKApiInvoker.m"),
("NIKDate.h", destinationDir, "NIKDate.h"),
("NIKDate.m", destinationDir, "NIKDate.m"))
}