MissingRequired

class MissingRequired(val path: String, val expected: String) : ConfigError

A required field (non-nullable, no default) is missing from the YAML map.

Generated when the YAML map contains no entry for a constructor parameter that is neither optional (has a Kotlin default) nor nullable, and no @MigrateFrom fallback key resolves to a value.

Example:

data class Database(val host: String)  // no default, not nullable

With an empty YAML map:

MissingRequired(path = "database.host", expected = "String")

Since

1.0

Parameters

path

Dot-separated field path.

expected

Human-readable name of the expected type.

Constructors

Link copied to clipboard
constructor(path: String, expected: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard