6
6
"hydra:description" : "This API shows how a basic CRUD (Create, Read, Update, Delete) API can be designed using Hydra Core Vocabulary." ,
7
7
"hydra:entrypoint" : "/" ,
8
8
"hydra:supportedClass" : [
9
+ {
10
+ "@id" : "schema:EntryPoint" ,
11
+ "@type" : "hydra:Class" ,
12
+ "hydra:title" : "API entrypoint" ,
13
+ "hydra:supportedProperty" : [
14
+ {
15
+ "hydra:property" : "hydra:collection" ,
16
+ "hydra:title" : "Collections" ,
17
+ "hydra:description" : "Collections provided by this API"
18
+ }
19
+ ]
20
+ } ,
21
+ {
22
+ "@id" : "mov:MovieCollection" ,
23
+ "@type" : "hydra:Class" ,
24
+ "hydra:title" : "All movies" ,
25
+ "hydra:supportedOperation" : {
26
+ "@id" : "mov:create-movie" ,
27
+ "@type" : "schema:CreateAction" ,
28
+ "hydra:title" : "Create a new movie" ,
29
+ "hydra:method" : "POST" ,
30
+ "hydra:expects" : "schema:Movie" ,
31
+ "hydra:returns" : "schema:Movie" ,
32
+ "hydra:statusCodes" : [
33
+ {
34
+ "hydra:code" : 201 ,
35
+ "hydra:description" : "If the movie was created successfully."
36
+ }
37
+ ]
38
+ }
39
+ } ,
9
40
{
10
41
"@id" : "schema:Movie" ,
11
42
"@type" : "hydra:Class" ,
12
- "hydra:title" : "A movie"
43
+ "hydra:title" : "Movie" ,
44
+ "hydra:supportedProperty" : [
45
+ {
46
+ "hydra:property" : "schema:name" ,
47
+ "hydra:title" : "name" ,
48
+ "hydra:description" : "The movie's name"
49
+ }
50
+ ]
13
51
}
14
52
]
15
- }
53
+ }
0 commit comments