-
Notifications
You must be signed in to change notification settings - Fork 181
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
Feature request: exclude imported types #364
Comments
That's a very good idea. Would you be interested in providing a PR? |
I'm happy to help, but this is an area of code I'm not very familiar with. (Which is why I've always used existing utilities!) Can you suggest some pseudo code or a place where this might go, to get me started? |
I think this could fit somewhere in here: XmlSchemaClassGenerator/XmlSchemaClassGenerator/Generator.cs Lines 320 to 374 in 990b09d
|
Thanks, I'll take a look! |
Xsd2Code used to have an
eit
flag to exclude imported types, so that code would only be generated for the types in the schema files being looked at. This is useful when a schema makes use of a number of imported types that have already had their code files generated; we only care about the new types being added to the ecosystem.In my case, I can fake this by using a custom
OutputWriter
that ignores all namespaces except the one that I'm interested in (since each of my XSDs defines a unique target namespaces) or by cleaning up after code generation and deleting the code files I don't need. But it would be nice if the generator could have a flag to handle this natively.The text was updated successfully, but these errors were encountered: