forked from loafle/openapi-generator-original
removed commented out block
This commit is contained in:
parent
f167959a38
commit
a757416a0e
@ -18,16 +18,7 @@ class PetApi (implicit val swagger: Swagger) extends ScalatraServlet
|
||||
|
||||
protected val applicationDescription: String = "PetApi"
|
||||
override protected val applicationName: Option[String] = Some("pet")
|
||||
/*
|
||||
def swaggerToModel(cls: Class[_]) = {
|
||||
val docObj = ApiPropertiesReader.read(cls)
|
||||
val name = docObj.getName
|
||||
val fields = for (field <- docObj.getFields.asScala.filter(d => d.paramType != null))
|
||||
yield (field.name -> ModelField(field.name, field.notes, DataType(field.paramType)))
|
||||
|
||||
Model(name, name, fields.toMap)
|
||||
}
|
||||
*/
|
||||
before() {
|
||||
contentType = formats("json")
|
||||
response.headers += ("Access-Control-Allow-Origin" -> "*")
|
||||
|
@ -18,16 +18,7 @@ class StoreApi (implicit val swagger: Swagger) extends ScalatraServlet
|
||||
|
||||
protected val applicationDescription: String = "StoreApi"
|
||||
override protected val applicationName: Option[String] = Some("store")
|
||||
/*
|
||||
def swaggerToModel(cls: Class[_]) = {
|
||||
val docObj = ApiPropertiesReader.read(cls)
|
||||
val name = docObj.getName
|
||||
val fields = for (field <- docObj.getFields.asScala.filter(d => d.paramType != null))
|
||||
yield (field.name -> ModelField(field.name, field.notes, DataType(field.paramType)))
|
||||
|
||||
Model(name, name, fields.toMap)
|
||||
}
|
||||
*/
|
||||
before() {
|
||||
contentType = formats("json")
|
||||
response.headers += ("Access-Control-Allow-Origin" -> "*")
|
||||
|
@ -18,16 +18,7 @@ class UserApi (implicit val swagger: Swagger) extends ScalatraServlet
|
||||
|
||||
protected val applicationDescription: String = "UserApi"
|
||||
override protected val applicationName: Option[String] = Some("user")
|
||||
/*
|
||||
def swaggerToModel(cls: Class[_]) = {
|
||||
val docObj = ApiPropertiesReader.read(cls)
|
||||
val name = docObj.getName
|
||||
val fields = for (field <- docObj.getFields.asScala.filter(d => d.paramType != null))
|
||||
yield (field.name -> ModelField(field.name, field.notes, DataType(field.paramType)))
|
||||
|
||||
Model(name, name, fields.toMap)
|
||||
}
|
||||
*/
|
||||
before() {
|
||||
contentType = formats("json")
|
||||
response.headers += ("Access-Control-Allow-Origin" -> "*")
|
||||
|
@ -19,16 +19,7 @@ class {{className}} (implicit val swagger: Swagger) extends ScalatraServlet
|
||||
|
||||
protected val applicationDescription: String = "{{className}}"
|
||||
override protected val applicationName: Option[String] = Some("{{baseName}}")
|
||||
/*
|
||||
def swaggerToModel(cls: Class[_]) = {
|
||||
val docObj = ApiPropertiesReader.read(cls)
|
||||
val name = docObj.getName
|
||||
val fields = for (field <- docObj.getFields.asScala.filter(d => d.paramType != null))
|
||||
yield (field.name -> ModelField(field.name, field.notes, DataType(field.paramType)))
|
||||
|
||||
Model(name, name, fields.toMap)
|
||||
}
|
||||
*/
|
||||
before() {
|
||||
contentType = formats("json")
|
||||
response.headers += ("Access-Control-Allow-Origin" -> "*")
|
||||
|
Loading…
x
Reference in New Issue
Block a user