-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
Description
Blocked by
Description
Implement a YAML deserializer with extended functionality to support environment variable substitution and proper handling of default values.
Acceptance Criteria
- The deserializer should accept standard primitive and object values.
- The deserializer must not fail when encountering fields that do not exist in the target class and should handle them gracefully.
- The deserializer should support environment variable substitution in the form
${ENV_VAR}
. - The deserializer should support environment variable substitution with a default fallback in the form
${ENV_VAR:-value}
, wherevalue
is used ifENV_VAR
is null. - The deserializer should allow creating an object with a default value from an empty YAML node, even if the property type is nullable.
Example:
field:
public class Configuration
{
[YamlMember(Alias = "field")]
public FiledClass? Field{ get; set; } = new();
}
Expected output:
Field is instantiated with its default value.
Metadata
Metadata
Assignees
Labels
No labels