<#1202 explicitly handle discriminator + oneOf for...
# flyte-github
a
#1202 explicitly handle discriminator + oneOf for pydantic Unions Pull request opened by cosmicBboy This pull request refactors the logic for generating attribute lists from dataclass JSON schemas, improving the handling of
$ref
references and discriminated unions in Pydantic-generated schemas. It also updates dependency recency exclusion for the
flyte
package. Schema processing improvements • Refactored the order of handling for
$ref
references and discriminated unions in
generate_attribute_list_from_dataclass_json_mixin
, ensuring that non-dict property values and discriminated unions with both
discriminator
and
oneOf
are handled before
$ref
logic. This makes the type inference more robust and fixes edge cases with Pydantic v2 schemas. • Moved the
$ref
handling block to after the checks for non-dict property values and discriminated unions, restoring and improving the previous logic for nested models and custom types. Dependency management • Added
flyte = "0 days"
to the
[tool.uv.exclude-newer-package]
section in
pyproject.toml
, ensuring that the latest
flyte
package releases are picked up immediately, similar to other Flyte-related packages. flyteorg/flyte-sdk