Routing
class Routing(val contentType: ContentType = ContentType.Application.Json, val schemaInference: JsonSchemaInference? = null, val securitySchemes: Application.() -> Map<String, ReferenceOr<SecurityScheme>> = {
findSecuritySchemes()
}, val serializeModel: (OpenApiDoc) -> String = serializeDefault(contentType), val routes: Application.() -> Sequence<Route> = { routingRoot.descendants() }) : OpenApiDocSource(source)
A source for an OpenAPI document that is generated from the application's routing tree.
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.
Constructors
Link copied to clipboard
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() })