DefaultCodeGenerator

Default implementation of CodeGenerator that produces Kotlin object classes using only Kotlin standard library types.

Supports two generation modes:

  • Multi-environment (activeEnvironment is null): generates nested objects per environment

  • Active environment (activeEnvironment is set): generates a single flat object

Parameters

packageName

Required package declaration for the generated file

Constructors

Link copied to clipboard
constructor(packageName: String)

Functions

Link copied to clipboard
open override fun generate(schema: Schema, configs: Map<String, EnvironmentConfig>, globalConfig: GlobalConfig?, activeEnvironment: String?, className: String): String

Generates Kotlin source code for the given schema and configurations.