SchemaGeneratorBuilder

Builder class for constructing a SchemaGenerator with customizable modules and options. This builder allows configuration of various JSON schema generation modules including Jackson, Jakarta Validation, Swagger2, Kotlin, Joda Money, and Wow-specific modules.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var customizer: Consumer<SchemaGeneratorConfigBuilder>?
Link copied to clipboard
var jacksonModule: JacksonSchemaModule?

Jackson module for handling Jackson annotations in schema generation.

Link copied to clipboard
var jakartaValidationModule: JakartaValidationModule?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var objectMapper: ObjectMapper?
Link copied to clipboard
var optionPreset: OptionPreset

The preset of options to apply to the schema generator.

Link copied to clipboard
var options: List<Option>
Link copied to clipboard
var schemaVersion: SchemaVersion

The JSON Schema version to use for generation.

Link copied to clipboard
var swagger2Module: Swagger2Module?
Link copied to clipboard

Functions

Link copied to clipboard
fun build(): SchemaGenerator

Builds a generator from buildConfig.

Link copied to clipboard
fun buildConfig(): SchemaGeneratorConfig

The generator configuration: the modules in a fixed order, then options, then the customizer.

Link copied to clipboard

A builder with the same settings: changing a setting of either one leaves the other as it is. The module instances are shared, not copied, and a module such as WowJacksonModule keeps the object mapper of the last configuration it was applied to, so build at most one of the two when they use different object mappers.

Link copied to clipboard
fun customizer(customizer: Consumer<SchemaGeneratorConfigBuilder>): SchemaGeneratorBuilder
Link copied to clipboard
fun jacksonModule(jacksonModule: JacksonSchemaModule?): SchemaGeneratorBuilder
Link copied to clipboard
fun jakartaValidationModule(jakartaValidationModule: JakartaValidationModule?): SchemaGeneratorBuilder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun objectMapper(objectMapper: ObjectMapper): SchemaGeneratorBuilder
Link copied to clipboard
fun optionPreset(optionPreset: OptionPreset): SchemaGeneratorBuilder
Link copied to clipboard
fun options(options: List<Option>): SchemaGeneratorBuilder
Link copied to clipboard
Link copied to clipboard
fun schemaVersion(schemaVersion: SchemaVersion): SchemaGeneratorBuilder
Link copied to clipboard
fun swagger2Module(swagger2Module: Swagger2Module?): SchemaGeneratorBuilder
Link copied to clipboard