-
Notifications
You must be signed in to change notification settings - Fork 63
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
EntityModel.ConvertToOpenApi method memory usage #389
Comments
Morning, is there any update on this? Do you need more information? |
Hey @garrypopplewell can you try to set the convert setting |
You can also disable |
Hi Irvine, thanks for the suggestion, that doesn't seem to make any difference unfortunately. Is there a way to strip out unwanted paths from the EDM model? the closest i've found is the below... If you could show me a way to remove excess paths from the EDM model that would be perfect? |
Apologies for the long overdue reply @garrypopplewell I have generated a list of paths for the EDMX1 file, EDMX1_OpenAPI Paths. If you scroll to the bottom of the file you'll see the number of paths per API. And a secondary file, EDMX1_OpenAPI Paths (No nav prop paths) which is similar to the above but without navigation property paths. These files are in the zipped folder. This is a conversion setting that can be toggled via |
When using IEdmModel.ConvertToOpenApi - some EDMX documents appear to trigger massive memory usage on some occasions it never seems to finish, I've left it for upwards of 30 minutes. I am trying to generate documentation for Microsoft Dynamics Business Central API's.
Assemblies affected
This is a C# WPF .NET7.0 app
Microsoft.OpenApi.OData.EdmModelOpenApiExtensions.ConvertToOpenApi()
Steps to reproduce
the below code in conjunction with the example EDMX examples replicates the issue
var EdmData = System.IO.File.ReadAllText(ExampleEdmxFilePath);
IEdmModel model = CsdlReader.Parse(XElement.Parse(EdmData).CreateReader());
var document = EntityModel.ConvertToOpenApi();
Expected result
The OpenApiDocument is created quickly and with reasonable memory usage
Actual result
The OpenApiDocument is not created/created very slowly and uses massive amount of memory
Additional detail
From the attached zip file
EDMX examples.zip
The text was updated successfully, but these errors were encountered: