@@ -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",
@@ -80,7 +84,40 @@ Feature: Table inheritance
8084 }
8185 """
8286
83- @createSchema
87+ Scenario : Some children not api resources are created in the app
88+ When some dummy table inheritance data but not api resource child are created
89+ And I send a "GET" request to "/dummy_table_inheritances"
90+ Then the response status code should be 200
91+ And the response should be in JSON
92+ And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
93+ And the JSON should be valid according to this schema:
94+ """
95+ {
96+ "type": "object",
97+ "properties": {
98+ "hydra:member": {
99+ "type": "array",
100+ "items": {
101+ "type": "object",
102+ "properties": {
103+ "@type": {
104+ "type": "string",
105+ "pattern": "^DummyTableInheritance(Child)?$",
106+ "required": "true"
107+ },
108+ "name": {
109+ "type": "string",
110+ "required": "true"
111+ }
112+ }
113+ },
114+ "minItems": 1
115+ }
116+ },
117+ "required": ["hydra:member"]
118+ }
119+ """
120+
84121 Scenario : Create a table inherited resource
85122 When I add "Content-Type" header equal to "application/ld+json"
86123 And I send a "POST" request to "/dummy_table_inheritance_children" with body:
@@ -97,15 +134,18 @@ Feature: Table inheritance
97134 "properties": {
98135 "@type": {
99136 "type": "string",
100- "pattern": "^DummyTableInheritanceChild$"
137+ "pattern": "^DummyTableInheritanceChild$",
138+ "required": "true"
101139 },
102140 "@context": {
103141 "type": "string",
104- "pattern": "^/contexts/DummyTableInheritanceChild$"
142+ "pattern": "^/contexts/DummyTableInheritanceChild$",
143+ "required": "true"
105144 },
106145 "@id": {
107146 "type": "string",
108- "pattern": "^/dummy_table_inheritance_children/1$"
147+ "pattern": "^/dummy_table_inheritance_children/3$",
148+ "required": "true"
109149 },
110150 "name": {
111151 "type": "string",
@@ -136,15 +176,18 @@ Feature: Table inheritance
136176 "properties": {
137177 "@type": {
138178 "type": "string",
139- "pattern": "^DummyTableInheritanceDifferentChild$"
179+ "pattern": "^DummyTableInheritanceDifferentChild$",
180+ "required": "true"
140181 },
141182 "@context": {
142183 "type": "string",
143- "pattern": "^/contexts/DummyTableInheritanceDifferentChild$"
184+ "pattern": "^/contexts/DummyTableInheritanceDifferentChild$",
185+ "required": "true"
144186 },
145187 "@id": {
146188 "type": "string",
147- "pattern": "^/dummy_table_inheritance_different_children/2$"
189+ "pattern": "^/dummy_table_inheritance_different_children/4$",
190+ "required": "true"
148191 },
149192 "name": {
150193 "type": "string",
@@ -167,7 +210,7 @@ Feature: Table inheritance
167210 {
168211 "children": [
169212 "/dummy_table_inheritance_children/1",
170- "/dummy_table_inheritance_different_children/2 "
213+ "/dummy_table_inheritance_different_children/4 "
171214 ]
172215 }
173216 """
@@ -181,15 +224,18 @@ Feature: Table inheritance
181224 "properties": {
182225 "@type": {
183226 "type": "string",
184- "pattern": "^DummyTableInheritanceRelated$"
227+ "pattern": "^DummyTableInheritanceRelated$",
228+ "required": "true"
185229 },
186230 "@context": {
187231 "type": "string",
188- "pattern": "^/contexts/DummyTableInheritanceRelated$"
232+ "pattern": "^/contexts/DummyTableInheritanceRelated$",
233+ "required": "true"
189234 },
190235 "@id": {
191236 "type": "string",
192- "pattern": "^/dummy_table_inheritance_relateds/1$"
237+ "pattern": "^/dummy_table_inheritance_relateds/1$",
238+ "required": "true"
193239 },
194240 "children": {
195241 "items": {
@@ -199,7 +245,8 @@ Feature: Table inheritance
199245 "properties": {
200246 "@type": {
201247 "type": "string",
202- "pattern": "^DummyTableInheritanceChild$"
248+ "pattern": "^DummyTableInheritanceChild$",
249+ "required": "true"
203250 },
204251 "name": {
205252 "type": "string",
@@ -215,7 +262,21 @@ Feature: Table inheritance
215262 "properties": {
216263 "@type": {
217264 "type": "string",
218- "pattern": "^DummyTableInheritanceDifferentChild$"
265+ "pattern": "^DummyTableInheritance$",
266+ "required": "true"
267+ },
268+ "name": {
269+ "type": "string",
270+ "required": "true"
271+ }
272+ }
273+ },
274+ {
275+ "properties": {
276+ "@type": {
277+ "type": "string",
278+ "pattern": "^DummyTableInheritanceDifferentChild$",
279+ "required": "true"
219280 },
220281 "name": {
221282 "type": "string",
@@ -255,7 +316,8 @@ Feature: Table inheritance
255316 "properties": {
256317 "@type": {
257318 "type": "string",
258- "pattern": "^DummyTableInheritanceChild$"
319+ "pattern": "^DummyTableInheritanceChild$",
320+ "required": "true"
259321 },
260322 "name": {
261323 "type": "string",
@@ -271,7 +333,21 @@ Feature: Table inheritance
271333 "properties": {
272334 "@type": {
273335 "type": "string",
274- "pattern": "^DummyTableInheritanceDifferentChild$"
336+ "pattern": "^DummyTableInheritance$",
337+ "required": "true"
338+ },
339+ "name": {
340+ "type": "string",
341+ "required": "true"
342+ }
343+ }
344+ },
345+ {
346+ "properties": {
347+ "@type": {
348+ "type": "string",
349+ "pattern": "^DummyTableInheritanceDifferentChild$",
350+ "required": "true"
275351 },
276352 "name": {
277353 "type": "string",
0 commit comments