-
Notifications
You must be signed in to change notification settings - Fork 61
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
Question: can we filter metadata? #65
Comments
@FixRM Thanks for trying this tool.
|
@xuzhg, thanks for quick reply. Can you please give me a sample of how to use IODataPathProvider? |
@FixRM My design is that you can derive from "ODataPathProvider" and override this virtual method. However, "ODataPathProvider" is used in the ODataContext, that's an internal class. I'd like to expose an interface in the setting class so developer can create an instance of "his own ODataPathProvider", but it's not supported yet. |
I see. What other options do I have? I was thinking of filtering while loading XML nodes, but it seems tricky and my VS is dying when I try to load original file into it |
|
If we removed examples as proposed here #68 it would help to reduce the document size. Also, yaml produces a much more compact format than JSON. |
@FixRM I think your best option would be to run the CSDL through an XSLT transform first to cut out the parts of the CSDL you don't want to process. We do some preprocessing of our CSDL this way using this approach https://github.com/microsoftgraph/msgraph-metadata/blob/master/transforms/csdl/preprocess_csdl.xsl |
@darrelmiller, thank you for your suggestion. Can you please help me with the transform? My CSDL looks like this:
I started with this one, but it generates same document.
What am I doing wrong? |
It was namespace problem. Correct transform:
|
I also have an EDMX that produces over 6400 paths- and 1800+ schemas -my swagger result is only 17 MB, but I’m also interested in ways to pass in a schema-of-interest and have the rest ignored |
Hello!
Thank you for a great tool! We use it to generate docs for Microsoft Common Data Service OData endpoint (formerly Dynamics CRM, formerly D365). This endpoint is generic and has quite big CSDL file (about 4 MB). Resulting JSON file is about 880 MB!!! Can you please suggest how we can cut some unused datasets and related stuff before generating OpenAPI file?
The text was updated successfully, but these errors were encountered: