@@ -20,15 +20,18 @@ Feature: Table inheritance
2020 "properties": {
2121 "@type": {
2222 "type": "string",
23- "pattern": "^DummyTableInheritanceChild$"
23+ "pattern": "^DummyTableInheritanceChild$",
24+ "required": "true"
2425 },
2526 "@context": {
2627 "type": "string",
27- "pattern": "^/contexts/DummyTableInheritanceChild$"
28+ "pattern": "^/contexts/DummyTableInheritanceChild$",
29+ "required": "true"
2830 },
2931 "@id": {
3032 "type": "string",
31- "pattern": "^/dummy_table_inheritance_children/1$"
33+ "pattern": "^/dummy_table_inheritance_children/1$",
34+ "required": "true"
3235 },
3336 "name": {
3437 "type": "string",
@@ -61,7 +64,8 @@ Feature: Table inheritance
6164 "properties": {
6265 "@type": {
6366 "type": "string",
64- "pattern": "^DummyTableInheritanceChild$"
67+ "pattern": "^DummyTableInheritanceChild$",
68+ "required": "true"
6569 },
6670 "name": {
6771 "type": "string",
@@ -81,6 +85,40 @@ Feature: Table inheritance
8185 """
8286
8387 @createSchema
88+ Scenario : Some children not api resources are created in the app
89+ When some dummy table inheritance data but not api resource child are created
90+ And I send a "GET" request to "/dummy_table_inheritances"
91+ Then the response status code should be 200
92+ And the response should be in JSON
93+ And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
94+ And the JSON should be valid according to this schema:
95+ """
96+ {
97+ "type": "object",
98+ "properties": {
99+ "hydra:member": {
100+ "type": "array",
101+ "items": {
102+ "type": "object",
103+ "properties": {
104+ "@type": {
105+ "type": "string",
106+ "pattern": "^DummyTableInheritance(Child)?$",
107+ "required": "true"
108+ },
109+ "name": {
110+ "type": "string",
111+ "required": "true"
112+ }
113+ }
114+ },
115+ "minItems": 1
116+ }
117+ },
118+ "required": ["hydra:member"]
119+ }
120+ """
121+
84122 Scenario : Create a table inherited resource
85123 When I add "Content-Type" header equal to "application/ld+json"
86124 And I send a "POST" request to "/dummy_table_inheritance_children" with body:
@@ -97,15 +135,18 @@ Feature: Table inheritance
97135 "properties": {
98136 "@type": {
99137 "type": "string",
100- "pattern": "^DummyTableInheritanceChild$"
138+ "pattern": "^DummyTableInheritanceChild$",
139+ "required": "true"
101140 },
102141 "@context": {
103142 "type": "string",
104- "pattern": "^/contexts/DummyTableInheritanceChild$"
143+ "pattern": "^/contexts/DummyTableInheritanceChild$",
144+ "required": "true"
105145 },
106146 "@id": {
107147 "type": "string",
108- "pattern": "^/dummy_table_inheritance_children/1$"
148+ "pattern": "^/dummy_table_inheritance_children/1$",
149+ "required": "true"
109150 },
110151 "name": {
111152 "type": "string",
@@ -136,15 +177,18 @@ Feature: Table inheritance
136177 "properties": {
137178 "@type": {
138179 "type": "string",
139- "pattern": "^DummyTableInheritanceDifferentChild$"
180+ "pattern": "^DummyTableInheritanceDifferentChild$",
181+ "required": "true"
140182 },
141183 "@context": {
142184 "type": "string",
143- "pattern": "^/contexts/DummyTableInheritanceDifferentChild$"
185+ "pattern": "^/contexts/DummyTableInheritanceDifferentChild$",
186+ "required": "true"
144187 },
145188 "@id": {
146189 "type": "string",
147- "pattern": "^/dummy_table_inheritance_different_children/2$"
190+ "pattern": "^/dummy_table_inheritance_different_children/2$",
191+ "required": "true"
148192 },
149193 "name": {
150194 "type": "string",
@@ -181,15 +225,18 @@ Feature: Table inheritance
181225 "properties": {
182226 "@type": {
183227 "type": "string",
184- "pattern": "^DummyTableInheritanceRelated$"
228+ "pattern": "^DummyTableInheritanceRelated$",
229+ "required": "true"
185230 },
186231 "@context": {
187232 "type": "string",
188- "pattern": "^/contexts/DummyTableInheritanceRelated$"
233+ "pattern": "^/contexts/DummyTableInheritanceRelated$",
234+ "required": "true"
189235 },
190236 "@id": {
191237 "type": "string",
192- "pattern": "^/dummy_table_inheritance_relateds/1$"
238+ "pattern": "^/dummy_table_inheritance_relateds/1$",
239+ "required": "true"
193240 },
194241 "children": {
195242 "items": {
@@ -199,7 +246,8 @@ Feature: Table inheritance
199246 "properties": {
200247 "@type": {
201248 "type": "string",
202- "pattern": "^DummyTableInheritanceChild$"
249+ "pattern": "^DummyTableInheritanceChild$",
250+ "required": "true"
203251 },
204252 "name": {
205253 "type": "string",
@@ -215,7 +263,8 @@ Feature: Table inheritance
215263 "properties": {
216264 "@type": {
217265 "type": "string",
218- "pattern": "^DummyTableInheritanceDifferentChild$"
266+ "pattern": "^DummyTableInheritanceDifferentChild$",
267+ "required": "true"
219268 },
220269 "name": {
221270 "type": "string",
@@ -255,7 +304,8 @@ Feature: Table inheritance
255304 "properties": {
256305 "@type": {
257306 "type": "string",
258- "pattern": "^DummyTableInheritanceChild$"
307+ "pattern": "^DummyTableInheritanceChild$",
308+ "required": "true"
259309 },
260310 "name": {
261311 "type": "string",
@@ -271,7 +321,8 @@ Feature: Table inheritance
271321 "properties": {
272322 "@type": {
273323 "type": "string",
274- "pattern": "^DummyTableInheritanceDifferentChild$"
324+ "pattern": "^DummyTableInheritanceDifferentChild$",
325+ "required": "true"
275326 },
276327 "name": {
277328 "type": "string",
0 commit comments