Feature request: exclude imported types
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.
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:
https://github.com/mganss/XmlSchemaClassGenerator/blob/990b09d34d577e4486fa86a85f78db556ec0d0c2/XmlSchemaClassGenerator/Generator.cs#L320-L374
Thanks, I'll take a look!