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

Avoid using DerivedElement with known elements for mixed wildcards #696

Merged
merged 1 commit into from
Aug 7, 2022

Conversation

tefra
Copy link
Owner

@tefra tefra commented Aug 6, 2022

📒 Description

xsdata is always wrapping data models with the DerivedElement generic during data binding.

There were multiple limitations with the generator and the resolve all qualified names.

I am not sure when but these issues are currently resolved so it's time to drop the mandatory wrapping to only when it's necessary.

Resolves #693 and #437

🔗 What I've Done

  • Update parsing to check mixed elements for a known qname
  • Update serializer to check for a known qname for mixed objects

💬 Comments

This breaks backwards compatibility. People will need to check object instance type and not assume it will always be a DerivedElement

🛫 Checklist

@codecov
Copy link

codecov bot commented Aug 6, 2022

Codecov Report

Merging #696 (2325be6) into master (9f646da) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #696   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           99        99           
  Lines         8688      8691    +3     
  Branches      2194      2195    +1     
=========================================
+ Hits          8688      8691    +3     
Impacted Files Coverage Δ
xsdata/formats/dataclass/parsers/nodes/element.py 100.00% <100.00%> (ø)
xsdata/formats/dataclass/serializers/xml.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tefra tefra merged commit 73b2d0b into master Aug 7, 2022
@tefra tefra deleted the fix-693 branch August 7, 2022 07:48
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.

Mixed complex types generates wrong XML tag names for children elements
1 participant