The Hello World example published on the repo uses something called SwaggerController. But I don't think that class exists anymore. I think it has been replaced with DocsController.
I tried to modify the HelloWorld example to use DocsController. this is the code I wrote
package com.abhi
import com.jakehschwartz.finatra.swagger.DocsController
import javax.inject.Inject
import io.swagger.models.Swagger
import com.twitter.finagle.http.{Request, Response}
class HelloController @Inject()(s: Swagger) extends DocsController {
getWithDoc("/hello:name") { o =>
o.summary("Say Hello to the person")
.tag("Hello")
.routeParam[String]("name", "name of the person")
.responseWith[String](200, "Hello person")
} {request : Request =>
val name = request.getParam("name")
response.ok.json(s"Hello $name")
}
}
but I get error
HelloController.scala:8:53: not enough arguments for constructor DocsController: (swagger: io.swagger.models.Swagger, endpoint: String)com.jakehschwartz.finatra.swagger.DocsController.
[error] Unspecified value parameters swagger, endpoint.
The Hello World example published on the repo uses something called SwaggerController. But I don't think that class exists anymore. I think it has been replaced with DocsController.
I tried to modify the HelloWorld example to use DocsController. this is the code I wrote
but I get error