Customizing Schema Generation - SMILEY4/ktor-openapi-tools GitHub Wiki
The default schema generator can be replaced and completly customized in the schema-section of the plugin config.
schemas {
generator = { type ->
// return a `io.github.smiley4.schemakenerator.swagger.data.CompiledSwaggerSchema`
// for the given type here
}
}
Schemas are automatically generated from types using schema-kenerator.
schemas {
schemas {
generator = { type ->
type
.processReflection()
.generateSwaggerSchema()
.withTitle(TitleType.SIMPLE)
.compileReferencingRoot()
}
}
}
More information can be found in the wiki of the schema-kenerator project together with an overview of the additionaly required dependencies here.