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

Capabilities annotations don't have a way to distinguish expandability for a collection vs expandability for an item within a collection #12

Open
garethj-msft opened this issue Feb 13, 2024 · 1 comment

Comments

@garethj-msft
Copy link

It's very useful to be able to distinguish capabilities of a single entity in a collection vs the capabilities of a collection.

This is embodied in ReadRestrictions vs ReadByKeyRestrictions for support for GET foos vs GET foos/{fooId}

In practice we've found that implementing $expand on a single entity is frequently cost-effective, whereas implementing it across a whole collection is not. Consequently we'd like to be able to qualify ExpandRestrictions with something akin to an ExpandByKeyRestrictions.

A cheap and cheerful variant of this would be a boolean control flag in ExpandRestrictions, but it misses the possibility that the expandable set of nav properties varies between single/collection.

For clarity, we need a vocabulary annotation that allows us to express

  1. NOT Supported: GET /foos?$expand=bars
    2 Supported: GET /foos/{fooId}?$expand=bars
@ralfhandl
Copy link
Contributor

Hi Gareth,

Thanks for pointing out this gap, I've created issue ODATA-1639 to track this.

We know that ExpandRestrictions need some rework, see also issue ODATA-1502.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants