sttp.tapir.swagger.http4s

Type members

Classlikes

class SwaggerHttp4s(yaml: String, contextPath: List[String], yamlName: String, redirectQuery: Map[String, Seq[String]])

Usage: add new SwaggerHttp4s(yaml).routes[F] to your http4s router. For example: Router("/" -> new SwaggerHttp4s(yaml).routes[IO]) or, in combination with other routes: Router("/" -> (routes <+> new SwaggerHttp4s(openApiYml).routes[IO])).orNotFound

Usage: add new SwaggerHttp4s(yaml).routes[F] to your http4s router. For example: Router("/" -> new SwaggerHttp4s(yaml).routes[IO]) or, in combination with other routes: Router("/" -> (routes <+> new SwaggerHttp4s(openApiYml).routes[IO])).orNotFound

Value Params
contextPath

The context in which the documentation will be served. Defaults to docs, so the address of the docs will be /docs.

redirectQuery

Additional query parameters to add when redirecting from the context path root to Swagger's index.html. For example, Map(defaultModelsExpandDepth, Seq("0")). Defaults to an empty map.

yaml

The yaml with the OpenAPI documentation.

yamlName

The name of the file, through which the yaml documentation will be served. Defaults to docs.yaml.