SwaggerUI
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
SwaggerUI.type
Members list
Value members
Concrete methods
Creates routes for serving the Swagger UI at the given path.
Creates routes for serving the Swagger UI at the given path.
Example:
val routes: Routes[Any, Response] = ???
val openAPIv1: OpenAPI = ???
val openAPIv2: OpenAPI = ???
val swaggerUIRoutes = SwaggerUI.routes("docs" / "openapi", openAPIv1, openAPIv2)
val routesWithSwagger = routes ++ swaggerUIRoutes
With this middleware in place, a request to https://www.domain.com/[path]
would serve the Swagger UI. The different OpenAPI specifications are served at https://www.domain.com/[path]/[title].json
. Where title
is the title of the OpenAPI specification and is url encoded.
Attributes
Creates a middleware for serving the Swagger UI at the given path and with the given swagger ui version.
Creates a middleware for serving the Swagger UI at the given path and with the given swagger ui version.
Example:
val routes: Routes[Any, Response] = ???
val openAPIv1: OpenAPI = ???
val openAPIv2: OpenAPI = ???
val swaggerUIRoutes = SwaggerUI.routes("docs" / "openapi", openAPIv1, openAPIv2)
val routesWithSwagger = routes ++ swaggerUIRoutes
With this middleware in place, a request to https://www.domain.com/[path]
would serve the Swagger UI. The different OpenAPI specifications are served at https://www.domain.com/[path]/[title].json
. Where title
is the title of the OpenAPI specification and is url encoded.