@@ -56,26 +56,20 @@ public function testGetOpenApiDescriptionWhenNoCustomerSchema(): void
5656 [
5757 'name ' => 'id ' ,
5858 'in ' => 'query ' ,
59- 'description ' => '' ,
6059 'required ' => false ,
61- 'deprecated ' => false ,
6260 'schema ' => [
6361 'type ' => 'string ' ,
6462 'format ' => 'uuid ' ,
6563 ],
66- 'style ' => 'form ' ,
67- 'explode ' => false ,
6864 ],
69- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
65+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
7066 );
7167
7268 self ::assertContains (
7369 [
7470 'name ' => 'id[] ' ,
7571 'in ' => 'query ' ,
76- 'description ' => 'One or more Uuids ' ,
7772 'required ' => false ,
78- 'deprecated ' => false ,
7973 'schema ' => [
8074 'type ' => 'array ' ,
8175 'items ' => [
@@ -86,7 +80,7 @@ public function testGetOpenApiDescriptionWhenNoCustomerSchema(): void
8680 'style ' => 'deepObject ' ,
8781 'explode ' => true ,
8882 ],
89- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
83+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 , ' style ' => 1 , ' explode ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
9084 );
9185 }
9286
@@ -102,17 +96,13 @@ public function testGetOpenApiDescriptionWhenSchemaIsOnlyString(): void
10296 [
10397 'name ' => 'idfoo ' ,
10498 'in ' => 'query ' ,
105- 'description ' => '' ,
10699 'required ' => false ,
107- 'deprecated ' => false ,
108100 'schema ' => [
109101 'type ' => 'string ' ,
110102 'format ' => 'uuid ' ,
111103 ],
112- 'style ' => 'form ' ,
113- 'explode ' => false ,
114104 ],
115- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
105+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
116106 );
117107
118108 self ::assertNotContains (
@@ -137,9 +127,7 @@ public function testGetOpenApiDescriptionWhenSchemaIsOnlyArray(): void
137127 [
138128 'name ' => 'idbar[] ' ,
139129 'in ' => 'query ' ,
140- 'description ' => 'One or more Uuids ' ,
141130 'required ' => false ,
142- 'deprecated ' => false ,
143131 'schema ' => [
144132 'type ' => 'array ' ,
145133 'items ' => [
@@ -150,7 +138,7 @@ public function testGetOpenApiDescriptionWhenSchemaIsOnlyArray(): void
150138 'style ' => 'deepObject ' ,
151139 'explode ' => true ,
152140 ],
153- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
141+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 , ' style ' => 1 , ' explode ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
154142 );
155143 }
156144
@@ -166,26 +154,20 @@ public function testGetOpenApiDescriptionIsOneOfArrayOrString(): void
166154 [
167155 'name ' => 'idquz ' ,
168156 'in ' => 'query ' ,
169- 'description ' => '' ,
170157 'required ' => false ,
171- 'deprecated ' => false ,
172158 'schema ' => [
173159 'type ' => 'string ' ,
174160 'format ' => 'uuid ' ,
175161 ],
176- 'style ' => 'form ' ,
177- 'explode ' => false ,
178162 ],
179- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
163+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
180164 );
181165
182166 self ::assertContains (
183167 [
184168 'name ' => 'idquz[] ' ,
185169 'in ' => 'query ' ,
186- 'description ' => 'One or more Uuids ' ,
187170 'required ' => false ,
188- 'deprecated ' => false ,
189171 'schema ' => [
190172 'type ' => 'array ' ,
191173 'items ' => [
@@ -196,7 +178,7 @@ public function testGetOpenApiDescriptionIsOneOfArrayOrString(): void
196178 'style ' => 'deepObject ' ,
197179 'explode ' => true ,
198180 ],
199- $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ]
181+ array_map ( fn ( $ p ) => array_intersect_key ( $ p , [ ' name ' => 1 , ' in ' => 1 , ' required ' => 1 , ' schema ' => 1 , ' style ' => 1 , ' explode ' => 1 ]), $ json ['paths ' ]['/uuid_filter_with_custom_schemas ' ]['get ' ]['parameters ' ])
200182 );
201183 }
202184
0 commit comments