@@ -77,7 +77,8 @@ public function testInvoke(): void
77
77
'custom ' => ['method ' => 'HEAD ' , 'path ' => '/foo/{id} ' , 'openapi_context ' => [
78
78
'description ' => 'Custom description ' ,
79
79
'parameters ' => [
80
- ['description ' => 'Test parameter ' , 'name ' => 'param ' , 'in ' => 'path ' , 'type ' => 'string ' , 'required ' => true , 'default ' => 'BOTH ' ],
80
+ ['description ' => 'Test parameter ' , 'name ' => 'param ' , 'in ' => 'path ' , 'required ' => true ],
81
+ ['description ' => 'Replace parameter ' , 'name ' => 'id ' , 'in ' => 'path ' , 'required ' => true , 'schema ' => ['type ' => 'string ' , 'format ' => 'uuid ' ]],
81
82
],
82
83
'tags ' => ['Dummy ' , 'Profile ' ],
83
84
'responses ' => [
@@ -117,7 +118,11 @@ public function testInvoke(): void
117
118
'formats ' => ['method ' => 'PUT ' , 'path ' => '/formatted/{id} ' , 'output_formats ' => ['json ' => ['application/json ' ], 'csv ' => ['text/csv ' ]], 'input_formats ' => ['json ' => ['application/json ' ], 'csv ' => ['text/csv ' ]]],
118
119
],
119
120
[
120
- 'get ' => ['method ' => 'GET ' ] + self ::OPERATION_FORMATS ,
121
+ 'get ' => ['method ' => 'GET ' , 'openapi_context ' => [
122
+ 'parameters ' => [
123
+ ['description ' => 'Test modified collection page number ' , 'name ' => 'page ' , 'in ' => 'query ' , 'required ' => false , 'schema ' => ['type ' => 'integer ' , 'default ' => 1 ], 'allowEmptyValue ' => true ],
124
+ ],
125
+ ]] + self ::OPERATION_FORMATS ,
121
126
'post ' => ['method ' => 'POST ' ] + self ::OPERATION_FORMATS ,
122
127
'filtered ' => ['method ' => 'GET ' , 'filters ' => ['f1 ' , 'f2 ' , 'f3 ' , 'f4 ' , 'f5 ' ], 'path ' => '/filtered ' ] + self ::OPERATION_FORMATS ,
123
128
'paginated ' => ['method ' => 'GET ' , 'pagination_client_enabled ' => true , 'pagination_client_items_per_page ' => true , 'pagination_items_per_page ' => 20 , 'pagination_maximum_items_per_page ' => 80 , 'path ' => '/paginated ' ] + self ::OPERATION_FORMATS ,
@@ -306,7 +311,7 @@ public function testInvoke(): void
306
311
'Retrieves the collection of Dummy resources. ' ,
307
312
null ,
308
313
[
309
- new Model \Parameter ('page ' , 'query ' , 'The collection page number ' , false , false , true , [
314
+ new Model \Parameter ('page ' , 'query ' , 'Test modified collection page number ' , false , false , true , [
310
315
'type ' => 'integer ' ,
311
316
'default ' => 1 ,
312
317
]),
@@ -434,7 +439,7 @@ public function testInvoke(): void
434
439
'Dummy ' ,
435
440
'Custom description ' ,
436
441
null ,
437
- [new Model \Parameter ('param ' , 'path ' , 'Test parameter ' , true ), new Model \Parameter ('id ' , 'path ' , 'Resource identifier ' , true , false , false , ['type ' => 'string ' ])],
442
+ [new Model \Parameter ('param ' , 'path ' , 'Test parameter ' , true ), new Model \Parameter ('id ' , 'path ' , 'Replace parameter ' , true , false , false , ['type ' => 'string ' , ' format ' => ' uuid ' ])],
438
443
new Model \RequestBody ('Custom request body ' , new \ArrayObject ([
439
444
'multipart/form-data ' => [
440
445
'schema ' => [
0 commit comments