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

feat: Add option to ignore xml pattern restrictions #727

Merged
merged 1 commit into from
Dec 11, 2022
Merged

Conversation

tefra
Copy link
Owner

@tefra tefra commented Dec 11, 2022

📒 Description

xsdata is generating xsd pattern restrictions, but the binding module still can't handle them, they are there just for reference.

The generator also will reset the datatype to simple string, in order to avoid parsing/converting certain values like decimals incorrectly eg \d{2}.\d{1}.

Resolves #720

🔗 What I've Done

This pr adds an option to ignore-patterns.
They won't be generated and the processor won't try to reset the attr type.

💬 Comments

A place to write any comments to the reviewer.

🛫 Checklist

@sonarqubecloud
Copy link

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

@codecov
Copy link

codecov bot commented Dec 11, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (8114c4d) compared to base (152876d).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #727   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          101       101           
  Lines         8777      8780    +3     
  Branches      1950      1951    +1     
=========================================
+ Hits          8777      8780    +3     
Impacted Files Coverage Δ
...sdata/codegen/handlers/process_attributes_types.py 100.00% <100.00%> (ø)
xsdata/models/config.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.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tefra tefra merged commit 351464d into master Dec 11, 2022
@tefra tefra deleted the ignore-patterns branch December 17, 2022 16:00
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.

'generate' using xsd no longer treats type derived from xsd:decimal as Decimal
1 participant