Skip to content

Commit b0abc4f

Browse files
committed
fix
1 parent 14bea66 commit b0abc4f

3 files changed

Lines changed: 130 additions & 24 deletions

File tree

features/main/crud_uri_variables.feature

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ Feature: Uri Variables
3131
"hydra:method": "GET",
3232
"hydra:title": "getCompany",
3333
"returns": "Company"
34-
},
35-
{
36-
"@type": [
37-
"hydra:Operation",
38-
"schema:FindAction"
39-
],
40-
"hydra:description": "Retrieves a Company resource.",
41-
"hydra:method": "GET",
42-
"hydra:title": "getCompany",
43-
"returns": "owl:Nothing"
4434
}
4535
],
4636
"id": 1,
@@ -204,16 +194,6 @@ Feature: Uri Variables
204194
"hydra:method": "GET",
205195
"hydra:title": "getCompany",
206196
"returns": "Company"
207-
},
208-
{
209-
"@type": [
210-
"hydra:Operation",
211-
"schema:FindAction"
212-
],
213-
"hydra:description": "Retrieves a Company resource.",
214-
"hydra:method": "GET",
215-
"hydra:title": "getCompany",
216-
"returns": "owl:Nothing"
217197
}
218198
],
219199
"id": 1,

features/main/exposed_state.feature

Lines changed: 104 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,58 @@ Feature: Expose persisted object state
2121
"@context": "/contexts/TruncatedDummy",
2222
"@id": "/truncated_dummies/1",
2323
"@type": "TruncatedDummy",
24-
"value": "20.3",
25-
"id": 1
24+
"operation": [
25+
{
26+
"@type": [
27+
"hydra:Operation",
28+
"schema:FindAction"
29+
],
30+
"hydra:description": "Retrieves a TruncatedDummy resource.",
31+
"hydra:method": "GET",
32+
"hydra:title": "getTruncatedDummy",
33+
"returns": "TruncatedDummy"
34+
},
35+
{
36+
"@type": [
37+
"hydra:Operation",
38+
"schema:ReplaceAction"
39+
],
40+
"expects": "TruncatedDummy",
41+
"hydra:description": "Replaces the TruncatedDummy resource.",
42+
"hydra:method": "PUT",
43+
"hydra:title": "putTruncatedDummy",
44+
"returns": "TruncatedDummy"
45+
},
46+
{
47+
"@type": "hydra:Operation",
48+
"expects": "TruncatedDummy",
49+
"expectsHeader": [
50+
{
51+
"headerName": "Content-Type",
52+
"possibleValue": [
53+
"application/merge-patch+json",
54+
"application/vnd.api+json"
55+
]
56+
}
57+
],
58+
"hydra:description": "Updates the TruncatedDummy resource.",
59+
"hydra:method": "PATCH",
60+
"hydra:title": "patchTruncatedDummy",
61+
"returns": "TruncatedDummy"
62+
},
63+
{
64+
"@type": [
65+
"hydra:Operation",
66+
"schema:DeleteAction"
67+
],
68+
"hydra:description": "Deletes the TruncatedDummy resource.",
69+
"hydra:method": "DELETE",
70+
"hydra:title": "deleteTruncatedDummy",
71+
"returns": "owl:Nothing"
72+
}
73+
],
74+
"id": 1,
75+
"value": "20.3"
2676
}
2777
"""
2878

@@ -42,7 +92,57 @@ Feature: Expose persisted object state
4292
"@context": "/contexts/TruncatedDummy",
4393
"@id": "/truncated_dummies/1",
4494
"@type": "TruncatedDummy",
45-
"value": "42.4",
46-
"id": 1
95+
"operation": [
96+
{
97+
"@type": [
98+
"hydra:Operation",
99+
"schema:FindAction"
100+
],
101+
"hydra:description": "Retrieves a TruncatedDummy resource.",
102+
"hydra:method": "GET",
103+
"hydra:title": "getTruncatedDummy",
104+
"returns": "TruncatedDummy"
105+
},
106+
{
107+
"@type": [
108+
"hydra:Operation",
109+
"schema:ReplaceAction"
110+
],
111+
"expects": "TruncatedDummy",
112+
"hydra:description": "Replaces the TruncatedDummy resource.",
113+
"hydra:method": "PUT",
114+
"hydra:title": "putTruncatedDummy",
115+
"returns": "TruncatedDummy"
116+
},
117+
{
118+
"@type": "hydra:Operation",
119+
"expects": "TruncatedDummy",
120+
"expectsHeader": [
121+
{
122+
"headerName": "Content-Type",
123+
"possibleValue": [
124+
"application/merge-patch+json",
125+
"application/vnd.api+json"
126+
]
127+
}
128+
],
129+
"hydra:description": "Updates the TruncatedDummy resource.",
130+
"hydra:method": "PATCH",
131+
"hydra:title": "patchTruncatedDummy",
132+
"returns": "TruncatedDummy"
133+
},
134+
{
135+
"@type": [
136+
"hydra:Operation",
137+
"schema:DeleteAction"
138+
],
139+
"hydra:description": "Deletes the TruncatedDummy resource.",
140+
"hydra:method": "DELETE",
141+
"hydra:title": "deleteTruncatedDummy",
142+
"returns": "owl:Nothing"
143+
}
144+
],
145+
"id": 1,
146+
"value": "42.4"
47147
}
48148
"""

features/mercure/publish.feature

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@mercure
12
Feature: Mercure publish support
23
In order to publish an Update to the Mercure hub
34
As a developer
@@ -27,6 +28,15 @@ Feature: Mercure publish support
2728
"@context": "/contexts/MercureWithTopics",
2829
"@id": "/issue5074/mercure_with_topics/1",
2930
"@type": "MercureWithTopics",
31+
"operation": [
32+
{
33+
"@type": ["hydra:Operation", "schema:FindAction"],
34+
"hydra:description": "Retrieves a MercureWithTopics resource.",
35+
"hydra:method": "GET",
36+
"hydra:title": "getMercureWithTopics",
37+
"returns": "MercureWithTopics"
38+
}
39+
],
3040
"id": 1,
3141
"name": "Hello World!"
3242
}
@@ -54,6 +64,22 @@ Feature: Mercure publish support
5464
"@context": "/contexts/MercureWithTopicsAndGetOperation",
5565
"@id": "/mercure_with_topics_and_get_operations/1",
5666
"@type": "MercureWithTopicsAndGetOperation",
67+
"operation": [
68+
{
69+
"@type": ["hydra:Operation", "schema:FindAction"],
70+
"hydra:description": "Retrieves a MercureWithTopicsAndGetOperation resource.",
71+
"hydra:method": "GET",
72+
"hydra:title": "getMercureWithTopicsAndGetOperation",
73+
"returns": "MercureWithTopicsAndGetOperation"
74+
},
75+
{
76+
"@type": ["hydra:Operation", "schema:FindAction"],
77+
"hydra:description": "Retrieves a MercureWithTopicsAndGetOperation resource.",
78+
"hydra:method": "GET",
79+
"hydra:title": "getMercureWithTopicsAndGetOperation",
80+
"returns": "MercureWithTopicsAndGetOperation"
81+
}
82+
],
5783
"id": 1,
5884
"name": "Hello World!"
5985
}

0 commit comments

Comments
 (0)