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

Compound fields split in individual properties #1073

Closed
wants to merge 3 commits into from

Conversation

skinkie
Copy link
Contributor

@skinkie skinkie commented Sep 4, 2024

📒 Description

Direction I am thinking of. Does not resolve #1070 yet. Does execute, but does not produce the correct imports.

🔗 What I've Done

Changed the jinja2 templates to allow to iterate over attributes with choices, allowing per field access.

💬 Comments

Needs revision. @tefra I hope you can take a peak.

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 99.96%. Comparing base (8f266d5) to head (e568d4b).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
xsdata/formats/dataclass/filters.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1073      +/-   ##
===========================================
- Coverage   100.00%   99.96%   -0.04%     
===========================================
  Files          115      115              
  Lines         9259     9264       +5     
  Branches      2183     2185       +2     
===========================================
+ Hits          9259     9261       +2     
- Misses           0        3       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skinkie
Copy link
Contributor Author

skinkie commented Sep 5, 2024

When the strong typing is explicitly removed (field_type_names_fmt), the basic concept seems to be working (no issues with resolving types that have not been defined yet). But I see that I did not take into account choice fields with max_occurs > 1. That having said, the concept should be clear.

Copy link

sonarqubecloud bot commented Sep 5, 2024

@tefra
Copy link
Owner

tefra commented Dec 8, 2024

I can't accept this into the xsdata core, if you care to start a plugin I will gladly help you.

@tefra tefra closed this Dec 8, 2024
@skinkie
Copy link
Contributor Author

skinkie commented Dec 8, 2024

@tefra can you give me a pointer where I can find a plugin example?

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.

Compound Fields only for Iterables
2 participants