name

fun name(yamlName: String): FieldConfigScope<V>

Specifies the YAML/JSON key name for this field if it differs from the property name.

This is useful when the configuration file uses a different naming convention than your Kotlin code (e.g., snake_case vs camelCase).

Example:

// Maps "server_port" in config file to "serverPort" property
field(AppConfig::serverPort).name("server_port")

Return

this FieldConfigScope for method chaining

Parameters

yamlName

the key name to use in the configuration file