com.github.xiaodongw.swagger.finatra.FinatraSupportBase.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swagger-finatra2_2.11 Show documentation
Show all versions of swagger-finatra2_2.11 Show documentation
Add Swagger support for Finatra to generate REST API docuemnt
The newest version!
package com.github.xiaodongw.swagger.finatra
import io.swagger.models.{Swagger, Operation}
trait SwaggerSupportBase {
implicit protected val swagger: Swagger
implicit protected val convertToFinatraOperation = FinatraOperation.convertToFinatraOperation _
implicit protected val convertToFinatraSwagger = FinatraSwagger.convertToFinatraSwagger _
protected def registerOperation(path: String, method: String, operation: Operation): Unit = {
swagger.registerOperation(path, method, operation)
}
protected def swagger(f: Operation => Unit): Operation = {
val op = new Operation
f(op)
op
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy