File tree Expand file tree Collapse file tree
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -136,7 +136,17 @@ class APICoreContentHandlerTestCase extends TestCase {
136136 'data ' => [
137137 'type ' => 'array ' ,
138138 'items ' => [
139- '$ref ' => "#/components/schemas/ {$ endpoint ->model ->get_class_shortname ()}" ,
139+ 'allOf ' => [
140+ [
141+ 'type ' => 'object ' ,
142+ 'properties ' => [
143+ 'id ' => ['type ' => $ endpoint ->model ->id_type ],
144+ ],
145+ ],
146+ [
147+ '$ref ' => "#/components/schemas/ {$ endpoint ->model ->get_class_shortname ()}" ,
148+ ],
149+ ],
140150 ],
141151 ],
142152 ],
@@ -165,7 +175,17 @@ class APICoreContentHandlerTestCase extends TestCase {
165175 [
166176 'type ' => 'object ' ,
167177 'properties ' => [
168- 'data ' => ['$ref ' => "#/components/schemas/ {$ endpoint ->model ->get_class_shortname ()}" ],
178+ 'data ' => [
179+ 'allOf ' => [
180+ [
181+ 'type ' => 'object ' ,
182+ 'properties ' => [
183+ 'id ' => ['type ' => $ endpoint ->model ->id_type ],
184+ ],
185+ ],
186+ ['$ref ' => "#/components/schemas/ {$ endpoint ->model ->get_class_shortname ()}" ],
187+ ],
188+ ],
169189 ],
170190 ],
171191 ],
You can’t perform that action at this time.
0 commit comments