[Capabilities vocabulary support(https://learn.microsoft.com/en-us/odata/webapi/capabilities-vocabulary-support) is working well for an entity until we use Key value binding
Assemblies affected
Reproduce steps
public class MyEntity
{
public Guid Id { get; set; }
[Required]
[NotSortable]
[NotFilterable]
public required string SomeStringKey { get; set; }
}
private IEdmModel BuildModel()
{
var builder = new ODataConventionModelBuilder();
var entitySetConfiguration = builder.EntitySet<MyEntity>(nameof(MyEntity));
// If this line is present FilterRestrictions and SortRestrictions are removed from metadata.xml
entitySetConfiguration.EntityType.HasKey(e => new { e.SomeStringKey, e.Id });
return builder.GetEdmModel();
}
Expected result
Capabilities annotations should be declared whatever the entity key definition
Actual result
Capabilities annotations are ignored if the entity declare a composite
Additional detail
This may be related to #10, but I'm not sure if #10 is just obsolete or not
[Capabilities vocabulary support(https://learn.microsoft.com/en-us/odata/webapi/capabilities-vocabulary-support) is working well for an entity until we use Key value binding
Assemblies affected
Reproduce steps
Expected result
Capabilities annotations should be declared whatever the entity key definition
Actual result
Capabilities annotations are ignored if the entity declare a composite
Additional detail
This may be related to #10, but I'm not sure if #10 is just obsolete or not