Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse top-level prefix for all extension base types with explicit XML type declarations #1072

Merged
merged 8 commits into from
Mar 10, 2023

Conversation

glopesdev
Copy link
Member

@glopesdev glopesdev commented Oct 4, 2022

WorkflowBuilder serialization procedure has been modified to walk up the inheritance tree of each extension type to search for any base types with explicit XmlTypeAttribute declarations. If any exist, they are explicitly added to the set of serializable extension types.

This prevents overly verbose inline XML namespace declarations for properties provided by base types which are not directly used elsewhere in the workflow.

Fixes #1056

@glopesdev
Copy link
Member Author

glopesdev commented Oct 4, 2022

The initial version of this fix was aiming at resolving ambiguous XmlSerializer behavior when serializing properties from base types without explicit XmlTypeAttribute declaration.

This approach has been dropped in favor of unambiguous serialization for types with explicit attribute declarations. In general, base types with serializable properties should always explicitly declare XmlTypeAttribute to ensure predictable namespace resolution.

@glopesdev glopesdev changed the title Include non-abstract extension base types during XML serialization Reuse top-level prefix for all extension base types with explicit XML type declarations Mar 10, 2023
@glopesdev glopesdev merged commit 57575be into bonsai-rx:main Mar 10, 2023
@glopesdev glopesdev deleted the issue-1056 branch March 10, 2023 11:47
@glopesdev glopesdev added this to the 2.8 milestone Mar 10, 2023
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.

XmlSerializer namespace scoping does not include base types
1 participant