Skip to content

Add support for IndexableByKey annotation for entity sets #541

Closed
@irvinesunday

Description

@irvinesunday

We need to add support for retrieving Org.OData.Capabilities.V1.IndexableByKey annotations for entity sets here:

if (entitySet != null)
{
string targetPath = path.GetTargetPath(_model);
count = _model.GetRecord<CountRestrictionsType>(targetPath, CapabilitiesConstants.CountRestrictions)
?? _model.GetRecord<CountRestrictionsType>(entitySet, CapabilitiesConstants.CountRestrictions);
if(count?.Countable ?? true) // ~/entitySet/$count
CreateCountPath(path, convertSettings);
CreateTypeCastPaths(path, convertSettings, entityType, entitySet, true); // ~/entitySet/subType
if (convertSettings.AddAlternateKeyPaths)
CreateAlternateKeyPath(path, entityType); //~/entitySet/{alternateKeyId}
path.Push(new ODataKeySegment(entityType)); // ~/entitySet/{id}
AppendPath(path.Clone());
CreateTypeCastPaths(path, convertSettings, entityType, entitySet, false); // ~/entitySet/{id}/subType
}

Will need to be resolved to fix: microsoftgraph/msgraph-metadata#427

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions