fix: fixes annotation definition in anyof parser #71
Reference in New Issue
Block a user
Delete Branch "fix/fixes-annotation-definition-anyof"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request refactors how default values are handled when constructing union types with field validators in the
from_properties_implmethod ofjambo/parser/anyof_type_parser.py. The main change is to explicitly extract and set default values for each sub-type, ensuring that defaults are correctly applied in the annotated fields.Field validator and default value handling:
field_typesto explicitly extract and set thedefaultvalue from each sub-type's properties, using...as a fallback when no default is provided. This ensures that default values are correctly passed to theFieldconstructor for each annotated type.Solves #69