-
Notifications
You must be signed in to change notification settings - Fork 63
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
Bound operations not appended to non-contained navigation property paths #232
Comments
Thanks for documenting this in details. I'm torn here. This case is an interesting example, and poor API design IMHO. The followed sites should instead be a collection of "followedSite", contained. FollowedSite is a new entity type that semantically belongs to the user (is contained), has a non-contained reference to site (existing entity), and potentially other properties like "followedDate", "followedReason", etc... But since the API is not getting fixed any time soon, we probably out to make an opiniated decision here. |
after a quick chat with @darrelmiller it looks like there's no such annotation. Can you have a look at the implications of changing contains target for that property? and see if we have other instances of that scenario? |
Appending |
The number of similar scenarios are quite significant. Below are just a couple of them: ** Non-containment Navigation properties:**
Entities:
Clearly, setting their containment to |
To provide an update to everyone here: Darrel brought it to the API council and it was decided to introduce a new attribute/annotation to say something like "target properties" which would contain list of non contained properties we want that method to target additionally to the contained properties/entity sets/singleton. |
From discussions with @darrelmiller, the recommendation was to come up with a custom annotation that will be appended to a given operation. This annotation will list the non-contained navigation properties that should append paths to the given operation. The annotation would look something like: |
After further discussions, the below annotation structure has been arrived at:
Example usage:
Find further reading of the proposal here |
This issue is blocked while waiting for the resolution of: OData/odata.net#2543 |
Can we confirm that we are no longer blocked? |
This is now unblocked. The PR to resolve this: #378 |
Resolved by: #378 |
Related to #201
With this bound operation:
and given this non-contained navigation property:
and given a schema namespace value of
microsoft.graph
We expect to generate paths similar to below:
.../followedSites/microsoft.graph.add
This is not the case with the current version because we check the containment of the navigation property here.
According to the spec. doc., see ref:
This may be applied to any navigation property segment as long as its type matches the type of the binding parameter.
The text was updated successfully, but these errors were encountered: