$count in resource explorer seems to put wrong url
Open Resource Explorer tab Expand the drives path Click $count
Result: url placed is https://graph.microsoft.com/v1.0/drives/$count which doesn't work as it's not a drive id.
Expectation
https://graph.microsoft.com/v1.0/drives?$count
We use CountRestrictions annotations to determine whether or not to add the $count segments to paths. If this is not specified in the CSDL, it defaults to true --> add the $count segment.
Should we add this as a setting when generating the document?
No, this should be added to the CSDL by the respective workload teams or by us via XSLT. The annotation would look like:
<Annotations Target="microsoft.graph.GraphService/drives">
<Annotation Term="Org.OData.Capabilities.V1.CountRestrictions">
<Record>
<PropertyValue Property="Countable" Bool="false" />
</Record>
</Annotation>
</Annotations>
@irvinesunday should we close this or move it to another repo?
<Annotations Target="microsoft.graph.GraphService/drives
@thewahome this was resolved in the metadata. You can close it if you can confirm that it is resolved in GE
@irvinesunday is this rolled out for all endpoints that support $count? I can still reproduce it on endpoints like /application, /chats etc
@irvinesunday is this rolled out for all endpoints that support $count? I can still reproduce it on endpoints like /application, /chats etc
@musale unfortunately this can only be currently addressed on a need basis. It might be hard to anticipate all the resources that don't support /$count. Ideally, workloads need to explicitly annotate their resources in the metadata to indicate support or otherwise for such operations/paths. The conversion library automatically assumes support (and hence generates the paths) unless explicitly annotated otherwise in the metadata. We are are trying to resolve this by getting workload owners to move to using Typespec as their API definition language. Typespec requires explicit annotations definitions.