swaggerUI

fun Route.swaggerUI(path: String, swaggerFile: String = "openapi/documentation.yaml", block: SwaggerConfig.() -> Unit = {})

Creates a get endpoint with SwaggerUI at path rendered from the OpenAPI file located at swaggerFile.

This method tries to lookup swaggerFile in the resources first, and if it's not found, it will try to read it from the file system using java.io.File.


fun Route.swaggerUI(path: String, apiFile: File, block: SwaggerConfig.() -> Unit = {})

Creates a get endpoint with SwaggerUI at path rendered from the apiFile.