ExtraBehavior
This enum defines the strategies for handling additional or unexpected fields during data processing. It provides options to allow, forbid, or ignore extra behavior to ensure strictness or flexibility in data validation.
Attributes
| Attribute | Type | Description |
|---|---|---|
| Allow | enum member | Permits additional fields or behaviors that are not explicitly defined in the schema. |
| Forbid | enum member | Triggers a validation error if any undefined fields or behaviors are encountered. |
| Ignore | enum member | Silently drops any undefined fields or behaviors without raising an error. |
Methods
Allow()
def Allow() - > [ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior)
Specifies that extra fields should be permitted and included in the processed data.
Returns
| Type | Description |
|---|---|
[ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior) | The Allow variant of the ExtraBehavior enum. |
Forbid()
def Forbid() - > [ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior)
Specifies that the presence of extra fields should result in a validation error.
Returns
| Type | Description |
|---|---|
[ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior) | The Forbid variant of the ExtraBehavior enum. |
Ignore()
def Ignore() - > [ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior)
Specifies that extra fields should be silently dropped during processing without raising an error.
Returns
| Type | Description |
|---|---|
[ExtraBehavior](extrabehavior.md?sid=build_tools_extrabehavior) | The Ignore variant of the ExtraBehavior enum. |