SerializationClassJsonSchemaGenerator

A generator for producing JSON Schema representations from kotlinx.serialization descriptors.

This class utilizes kotlinx.serialization introspection to analyze SerialDescriptor instances and generate JSON Schema objects. It is built on top of the AbstractSchemaGenerator and works with a configurable JsonSchemaConfig to define schema generation behavior.

Parameters

config

Configuration for generating JSON Schemas, such as formatting details and handling of optional nullable properties. Defaults to JsonSchemaConfig.Default.

Constructors

Link copied to clipboard
constructor(json: Json, config: JsonSchemaConfig)

Creates an instance of SerializationClassJsonSchemaGenerator.

constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun encodeToString(schema: JsonSchema): String
Link copied to clipboard
open override fun generateSchema(target: SerialDescriptor): JsonSchema
Link copied to clipboard
open override fun generateSchemaString(target: SerialDescriptor): String
Link copied to clipboard
open override fun schemaType(): KClass<JsonSchema>
Link copied to clipboard
open override fun targetType(): KClass<SerialDescriptor>