Skip to content

Distinct does not work on Enumerable<IEdmStructuredType> #352

@mhotze

Description

@mhotze

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugA broken experience

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions