ReflectionJsonSchemaInference

Infers JSON schema from reflection.

Designed for JVM servers where other frameworks (Jackson/Gson/etc.) may control JSON shape. This implementation can be extended by providing custom adapter.

Notes / limitations:

  • No $ref/component extraction is done here (schemas are expanded inline).

  • Cycles are guarded to avoid stack overflows, but will degrade to a generic OBJECT schema.

Report a problem

Constructors

Link copied to clipboard
constructor(adapter: SchemaReflectionAdapter)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun buildSchema(type: KType): JsonSchema
Link copied to clipboard

Creates an object schema for kClass with properties inferred from Kotlin reflection.

Link copied to clipboard