Routing
constructor(contentType: ContentType = ContentType.Application.Json, schemaInference: JsonSchemaInference? = null, securitySchemes: Application.() -> Map<String, ReferenceOr<SecurityScheme>> = {
findSecuritySchemes()
}, serializeModel: (OpenApiDoc) -> String = serializeDefault(contentType), routes: Application.() -> Sequence<Route> = { routingRoot.descendants() })(source)
Parameters
contentType
The content type of the generated document.
schemaInference
The JSON schema inference strategy to use when building models. Defaults to KotlinxJsonSchemaInference.
securitySchemes
Producer for security schemes to be included in the document. Defaults to all registered security schemes.
serializeModel
Function for serializing the OpenAPI document to a string. Defaults to kotlinx-serialization for JSON or YAML.
routes
Producer for routes to be included in the document. Defaults to the full routing tree.