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
content Type
The content type of the generated document.
schema Inference
The JSON schema inference strategy to use when building models. Defaults to KotlinxJsonSchemaInference.
security Schemes
Producer for security schemes to be included in the document. Defaults to all registered security schemes.
serialize Model
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.