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

Should support annotations to bound actions/functions via path #393

Open
ralfhandl opened this issue Mar 20, 2024 · 2 comments · May be fixed by #233
Open

Should support annotations to bound actions/functions via path #393

ralfhandl opened this issue Mar 20, 2024 · 2 comments · May be fixed by #233
Assignees
Labels
CSDL JSON CSDL XML V4.03 Too vague or controversial for 4.02

Comments

@ralfhandl
Copy link
Contributor

For capability annotations in particular, we have moved towards path-based external targeting in order to differentiate capabilities based on how the element is accessed.

These type of path-based annotation targets start with the entity container, started by an entity set, singleton, action import or function import, and then on from there, using the following rule:

· qualified name of an entity container followed by a segment containing a singleton or entity set name and zero or more property, navigation property, or type-cast segments

However, this rule doesn't include target paths that contain bound actions/functions.

Proposal

Add bound actions and bound functions to the list of things allowed within a target path for annotations.

Parameters can be used to differentiate overloads, including differentiating targets that identify operations bound to a collection versus members of a collection of a particular type.

#233

Imported from ODATA-1626

@HeikoTheissen
Copy link
Contributor

HeikoTheissen commented Mar 27, 2024

JIRA comment by @mikepizzo:

Note: since there is no key in the target path, if MyFunction is bound to both MyEntityType and MyEntitySet (which is a collection of MyEntityType), then it is ambiguous whether

MySchema.MyEntityContainer/MyEntitySet/MyFunction

references the overload bound to MyEntityType or Collection(MyEntityType). In this case, the above would reference all overloads bound to MyEntityType or Collection(MyEntityType), and they would have to be differentiated by providing the appropriate binding (and any non-binding) parameters:

MySchema.MyEntityContainer/MyEntitySet/MyFunction(MyEntityType)

or

MySchema.MyEntityContainer/MyEntitySet/MyFunction(Collection(MyEntityType)

@HeikoTheissen
Copy link
Contributor

JIRA comment by @HeikoTheissen:

Shall we also allow schema-bound paths like

MySchema.MyEntityType/MyNavigationProperty/MyFunction

?

@ralfhandl ralfhandl added V4.03 Too vague or controversial for 4.02 and removed V4.02 labels Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSDL JSON CSDL XML V4.03 Too vague or controversial for 4.02
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants