-
Notifications
You must be signed in to change notification settings - Fork 27
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
Enable hydra to expect and return non RDF resources #200
Merged
alien-mcl
merged 3 commits into
HydraCG:master
from
alien-mcl:feature/Enable_hydra_to_expect_and_return_non_RDF_resources
Oct 9, 2019
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -77,7 +77,8 @@ | |||||
"subClassOf": { "@id": "rdfs:subClassOf", "@type": "@vocab" }, | ||||||
"subPropertyOf": { "@id": "rdfs:subPropertyOf", "@type": "@vocab" }, | ||||||
"seeAlso": { "@id": "rdfs:seeAlso", "@type": "@id" }, | ||||||
"domainIncludes": { "@id": "schema:domainIncludes", "@type": "@id" } | ||||||
"domainIncludes": { "@id": "schema:domainIncludes", "@type": "@id" }, | ||||||
"rangeIncludes": { "@id": "schema:rangeIncludes", "@type": "@id" } | ||||||
}, | ||||||
"@id": "http://www.w3.org/ns/hydra/core", | ||||||
"@type": "owl:Ontology", | ||||||
|
@@ -253,7 +254,8 @@ | |||||
"label": "expects", | ||||||
"comment": "The information expected by the Web API.", | ||||||
"domain": "hydra:Operation", | ||||||
"range": "hydra:Class", | ||||||
"range": "hydra:Resource", | ||||||
"rangeIncludes": ["hydra:Resource", "hydra:Class"], | ||||||
"vs:term_status": "testing" | ||||||
}, | ||||||
{ | ||||||
|
@@ -262,7 +264,8 @@ | |||||
"label": "returns", | ||||||
"comment": "The information returned by the Web API on success", | ||||||
"domain": "hydra:Operation", | ||||||
"range": "hydra:Class", | ||||||
"range": "hydra:Resource", | ||||||
"rangeIncludes": ["hydra:Resource", "hydra:Class"], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto
Suggested change
|
||||||
"vs:term_status": "testing" | ||||||
}, | ||||||
{ | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's redundant to repeat
hydra:Resource
here. In fact, aResource
itself is not useful as an object ofexpects
/returns
. It has to be something more specific, likeClass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't agree. I think it's useful to have both predicates to contain
hydra:Resource
. Previously usedrdfs:range
is more for compatibility, but I'd like to useschema:rangeIncludes
in future implementations - it has weaker semantics.I'd leave it as I suggested, at least untill some more specific alternatives are available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't
hydra:Resource
what enables non-RDF payloads? I.e., won'thydra:Class
restrict payloads to RDF?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asbjornu,
schema:rangeIncludes
doesn't have that strong semantics asrdfs:range
. Putting onlyhydra:Class
insideschema:rangeIncludes
doesn't infer no other types can be used - it's more of a hint (well the name has it - range includes, but not restricts). Still, I'd prefer to have both so clients doesn't have to concatenate bothrdfs:range
andschema:rangeIncludes
to discover what's actually allowed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks for the explanation, @alien-mcl!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But
Resource
is range includes is actually not truthful. Most classes of Hydra are subclasses ofhydra:Resource
but they will not make sense asexpects
/returns
. This hint is misleading.