JsonSchemaGenerator

A utility class for generating JSON schema representations of Kotlin objects.

Functions

Link copied to clipboard
open override fun encodeToString(schema: JsonObject): String
Link copied to clipboard
abstract override fun generateSchema(target: T): JsonObject

Generates a JSON object representing the schema of the input target.

Link copied to clipboard
open override fun generateSchemaString(target: T): String

Serializes the schema of the provided object into a JSON-formatted string.

Link copied to clipboard
abstract fun schemaType(): KClass<JsonObject>
Link copied to clipboard
abstract fun targetType(): KClass<T>