jsonSchemaOf
inline fun <T> jsonSchemaOf(generator: SerializationClassJsonSchemaGenerator = SerializationClassJsonSchemaGenerator.Default): JsonSchema(source)
Generates a JSON Schema for the given @Serializable type T, using the provided generator.
Example:
@Serializable
data class Person(val name: String, val age: Int)
val schema = SerializationClassJsonSchemaGenerator.jsonSchemaOf<Person>()Content copied to clipboard