Skip to content
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

Distinct does not work on Enumerable<IEdmStructuredType> #352

Open
mhotze opened this issue Feb 28, 2023 · 0 comments
Open

Distinct does not work on Enumerable<IEdmStructuredType> #352

mhotze opened this issue Feb 28, 2023 · 0 comments
Assignees
Labels
type:bug A broken experience

Comments

@mhotze
Copy link

mhotze commented Feb 28, 2023

https://github.com/microsoft/OpenAPI.NET.OData/blame/c00a26b629e76d624f80911d4b97d9ae86af9cf7/src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiSchemaGenerator.cs#L197 produces duplicates, when there is a navigation property to an entity that is already associate in the entity sets. In our case the EntityType is not the same instance, so it MUST be compared by FullName to get distinct values. I made the same mistake recently, so it would be nice if there is a default comparer.

@adhiambovivian adhiambovivian added the type:bug A broken experience label Mar 24, 2023
@irvinesunday irvinesunday added this to the OData:1.4 milestone Mar 29, 2023
@irvinesunday irvinesunday self-assigned this Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

3 participants