-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove the need for async prefer headers
- Loading branch information
Showing
4 changed files
with
67 additions
and
84 deletions.
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
@prefix hydra: <http://www.w3.org/ns/hydra/core#> . | ||
@prefix hydra-box: <http://hydra-box.org/schema/> . | ||
@prefix code: <https://code.described.at/> . | ||
@prefix ds: <https://facts.wikibus.org/vocab#> . | ||
@prefix api: <https://facts.wikibus.org/api#> . | ||
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | ||
@prefix schema: <http://schema.org/> . | ||
@prefix impl: <file:lib/express/handlers/data-sheet/>. | ||
|
||
api:dataSheetCollection | ||
a hydra:Link ; | ||
rdfs:range api:DataSheetCollection ; | ||
hydra:supportedOperation _:PostToCollection . | ||
|
||
_:PostToCollection a hydra-box:View, | ||
schema:CreateAction ; | ||
hydra:title "Create a data sheet" ; | ||
hydra:method "POST" ; | ||
hydra:expects ds:DataSheet ; | ||
code:implementedBy [ | ||
a hydra-box:middlewareChain ; | ||
code:arguments ( | ||
[ | ||
a code:EcmaScript ; | ||
code:link impl:create#post ; | ||
] | ||
) | ||
] . | ||
|
||
ds:DataSheet a hydra:Class ; | ||
hydra:supportedProperty [ | ||
hydra:property rdfs:label ; | ||
hydra:required true | ||
] ; | ||
hydra:supportedOperation _:Get, | ||
_:Update . | ||
|
||
_:Get a hydra-box:View ; | ||
hydra:method "GET" ; | ||
code:implementedBy [ | ||
a hydra-box:middlewareChain ; | ||
code:arguments ( | ||
[ | ||
a code:EcmaScript ; | ||
code:link impl:instance#get ; | ||
] | ||
) | ||
] . | ||
|
||
_:Update a hydra-box:View, | ||
schema:UpdateAction ; | ||
hydra:method "PUT" ; | ||
code:implementedBy [ | ||
a hydra-box:middlewareChain ; | ||
code:arguments ( | ||
[ | ||
a code:EcmaScript ; | ||
code:link impl:instance#put ; | ||
] | ||
[ | ||
a code:EcmaScript ; | ||
code:link impl:instance#get ; | ||
] | ||
) | ||
] . | ||
|
||
<data-sheet/:id> a ds:DataSheet . |
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
This file was deleted.
Oops, something went wrong.
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