GenerationContext

data class GenerationContext(val json: Json, val descriptor: SerialDescriptor, val processedTypeDefs: MutableMap<SerialDescriptor, JsonObject>, val currentDefPath: List<SerialDescriptor>, val descriptionOverrides: Map<String, String>, val currentDescription: String?)(source)

Holds intermediate and stateful information about the current schema generation process.

Constructors

Link copied to clipboard
constructor(json: Json, descriptor: SerialDescriptor, processedTypeDefs: MutableMap<SerialDescriptor, JsonObject>, currentDefPath: List<SerialDescriptor>, descriptionOverrides: Map<String, String>, currentDescription: String?)

Properties

Link copied to clipboard

A list of SerialDescriptor representing the current path in the descriptor hierarchy during schema generation processing.

Link copied to clipboard

Description for the current element

Link copied to clipboard

A map of user-defined properties and types descriptions to override LLMDescription from the provided class.

Link copied to clipboard

The SerialDescriptor currently being processed.

Link copied to clipboard
val json: Json

Json instance used for serialization, provides required meta info needed for schema generation that is not available in SerialDescriptor.

Link copied to clipboard

A mutable map of SerialDescriptor to JsonObject, maintaining schema fragments for previously processed types to avoid redundant schema generation.

Functions

Link copied to clipboard

Helper method that gets description for an element in descriptor from descriptionOverrides map or LLMDescription annotation.

Link copied to clipboard

Helper method that gets description for descriptor type from descriptionOverrides map or LLMDescription annotation.