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

restriction base not used in generation #738

Closed
skinkie opened this issue Jan 20, 2023 · 5 comments · Fixed by #754
Closed

restriction base not used in generation #738

skinkie opened this issue Jan 20, 2023 · 5 comments · Fixed by #754

Comments

@skinkie
Copy link
Contributor

skinkie commented Jan 20, 2023

I am currently using analysis on mro basis in order to figure out how objects relate to eachother.

I notice that "restriction base" is not affecting the schema generation. Below are some examples. Can the restriction base used for inheritance. Or am I missing the point of the restriction in the first place?

NeTEx-CEN/NeTEx#407 (comment)

@tefra
Copy link
Owner

tefra commented Feb 21, 2023

Usually the base classes are not flattened unless, there is a reason, I am gonna take a look and see what's the issue with these restriction bases

@tefra
Copy link
Owner

tefra commented Feb 25, 2023

Early on, xsdata couldn't handle type overrides very good, so whenever a subclass was overriding a parent class field and the types didn't match the base classes were flattened. That part of the code is no longer relevant and actually had a few major flaws.

After I removed the faulty code, a few more issues came up and I had to harden a few things in compound fields. As always the netex schemas keep on giving some excellent use cases 🚀

Thank you @skinkie for the report, the fix is on master, give it a try and let me know what you think.

@skinkie
Copy link
Contributor Author

skinkie commented Feb 25, 2023

@tefra will try! :-)

@tefra
Copy link
Owner

tefra commented Feb 25, 2023

The output for netex suite just got a lot smaller

tefra/xsdata-samples@8e02a9d

@skinkie
Copy link
Contributor Author

skinkie commented Feb 25, 2023

Let's hope that my mro analyzer still works ;-)

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 a pull request may close this issue.

2 participants