Skip to content

Added processing of structures with None#58

Open
SergeKu wants to merge 1 commit intoddanier:mainfrom
SergeKu:main
Open

Added processing of structures with None#58
SergeKu wants to merge 1 commit intoddanier:mainfrom
SergeKu:main

Conversation

@SergeKu
Copy link

@SergeKu SergeKu commented Sep 10, 2025

Sometimes we need to convert structures like Union[Model1, Model2, None] to Union[all_fields_optional(Model1), all_fields_optional(Model2), None]. For this purpose parameter "struct_processing" added some functions.

Sometimes we need to convert structures like Union[Model1, Model2, None] to Union[all_fields_optional(Model1), all_fields_optional(Model2), None].
For this purpose parameter "struct_processing" added some functions.
@ddanier
Copy link
Owner

ddanier commented Feb 14, 2026

This should happen if you use recursive partials. Or am I missing something?
https://github.com/ddanier/pydantic-partial?tab=readme-ov-file#recursive-partials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants