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

Handling ambiguous operations #97

Open
tpluscode opened this issue May 26, 2021 · 1 comment
Open

Handling ambiguous operations #97

tpluscode opened this issue May 26, 2021 · 1 comment

Comments

@tpluscode
Copy link
Contributor

@bergos I wonder if you have thoughts on processing requests which match more than one operation.

Specifically, a common case will be hydra:Collection vs hydra:Resource. If both of those base classes would support a GET operation, trying to dereference any collection would fail because of that ambiguity. That is inevitable if the store would use inferring, since hydra:Collection rdfs:subClassOf hydra:Resource

I kinda have this pattern in mind to make operation "overrides", so that one operation can explicitly be marked as having priority over another

<GetResource> a hydra:Operation .

# For collections, use this and not the one above
<GetCollection> a hydra:Operation ; hydra-box:overrides <GetResource>.

Is that something that would make sense to be a hydra-box feature?

@tpluscode
Copy link
Contributor Author

On second thought, this could also be disambiguated based on class hierarchy.

Collection is a specialisation of Resource, so maybe it is only logical that conflicting operations would be resolved by the order, favouring child classes

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

1 participant