You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
there are some settings that you can use to do filter. For example: if set EnableNavigationPropertyPath = false, there will be no navigation property path.
IODataPathProvider has the "CanFilter" that is designed for your scenario, but so far, i don't have much requirement, so i haven't exposed it throw "ODataContext".
Artem Grunin (@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
Artem Grunin (@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 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
Activity
xuzhg commentedon Jun 1, 2020
Artem Grunin (@FixRM) Thanks for trying this tool.
there are some settings that you can use to do filter. For example: if set EnableNavigationPropertyPath = false, there will be no navigation property path.
IODataPathProvider has the "CanFilter" that is designed for your scenario, but so far, i don't have much requirement, so i haven't exposed it throw "ODataContext".
FixRM commentedon Jun 1, 2020
Sam Xu (@xuzhg), thanks for quick reply. Can you please give me a sample of how to use IODataPathProvider?
xuzhg commentedon Jun 1, 2020
Artem Grunin (@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.
FixRM commentedon Jun 1, 2020
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
xuzhg commentedon Jun 1, 2020
darrelmiller commentedon Jun 3, 2020
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.
darrelmiller commentedon Jul 4, 2020
Artem Grunin (@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
FixRM commentedon Jul 9, 2020
Darrel (@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?
FixRM commentedon Jul 9, 2020
It was namespace problem. Correct transform:
bkwdesign commentedon Dec 16, 2021
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