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

fix turtle syntax errors #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions api-documentation/2.3.complete-api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Example of such a description may be as follows (in Turtle syntax):
hydra:entrypoint </> ;
hydra:title "Hydra example API." ;
hydra:description "Some example API described using Hydra vocabulary" ;
hydra:supportedClass schema:Event, schema:Person ;
hydra:supportedClass schema:Event, schema:Person .

schema:Event a hydra:Class ;
hydra:supportedOperation <#get-events-operation> ,
Expand Down Expand Up @@ -91,13 +91,13 @@ schema:Event a hydra:Class ;

<#get-events-operation> a hydra:Operation ;
hydra:method "GET"^^xsd:string ;
hydra:possibleStatus "200"^xsd:int, "500"^^xsd:int ;
hydra:possibleStatus "200"^^xsd:int, "500"^^xsd:int ;
hydra:returns hydra:Collection .

<#new-event-operation> a hydra:Operation, schema:CreateAction ;
hydra:expects schema:Event ;
hydra:method "POST"^^xsd:string
hydra:possibleStatus "200"^xsd:int, "500"^^xsd:int .
hydra:method "POST"^^xsd:string ;
hydra:possibleStatus "200"^^xsd:int, "500"^^xsd:int .

# Link with operation below does not mention directly that no value is returned.
# Only hint of that may be taken from the 201 status.
Expand All @@ -111,19 +111,19 @@ schema:Event a hydra:Class ;
a hydra:Operation, schema:UpdateAction ;
hydra:title "Updates an event." ;
hydra:method "PUT"^^xsd:string ;
hydra:possibleStatus "201"^xsd:int, "404"^^xsd:int, "500"^^xsd:int ;
hydra:possibleStatus "201"^^xsd:int, "404"^^xsd:int, "500"^^xsd:int ;
hydra:expects schema:Event
], [
a hydra:Operation, schema:DeleteAction ;
hydra:title "Deletes an event." ;
hydra:method "DELETE"^^xsd:string ;
hydra:possibleStatus "201"^xsd:int, "404"^^xsd:int, "500"^^xsd:int
hydra:possibleStatus "201"^^xsd:int, "404"^^xsd:int, "500"^^xsd:int
].

<#id-mapping> a hydra:IriTemplateMapping ;
hydra:variableRepresentation: hydra:BasicRepresentation ;
hydra:variable "id"^^xsd:string ;
hydra:property vocab:id ;
hydra:property vocab:id .

vocab:id a rdf:Property ;
rdf:domain schema:Event ;
Expand All @@ -134,4 +134,4 @@ It is currently impossible to describe expected or returned cardinality of the l
gathered above. Both `hydra:returns` and `hydra:expects` are allowed to receive statements related
to multiple resources of same type. While for `PUT` operations server may use only statements related
to the resource identified by the call's URL, in case of `POST` where the resource will have no
explicit identifier server may end up with an 4XX or some other unexpected behavior.
explicit identifier server may end up with an 4XX or some other unexpected behavior.