Closed benascbr closed 2 months ago
I've tried to create pull request for this example but failed due permissions. https://github.com/dedoc/demo-scramble/tree/main
To reproduce please change: BookingsController
public function index(Request $request) { return $this->response(['foo1' => 'bar1'], 200); } public function indexFoo() { return $this->response(['foo2' => 'bar2'], 200); } public function response($collection, $code)//simplified example { return response()->json([ 'code' => $code, 'status' => 'OK', 'data' => $collection, ], $code); }
routes/api.php
Route::apiResource('bookings', BookingsController::class); Route::get('/bookings/foo', [BookingsController::class, 'indexFoo']);
Actual: http://scramble.test/docs/api#/operations/bookings.index shows response.data.foo1 http://scramble.test/docs/api#/operations/bookings.indexFoo shows response.data.foo1
Expected: http://scramble.test/docs/api#/operations/bookings.index shows response.data.foo1 http://scramble.test/docs/api#/operations/bookings.indexFoo shows response.data.foo2
@benascbr fixed in 0.11.13
Thanks for reporting! Indeed a nasty bug
@romalytvynenko thank you very much for such prompt help :tada: and this package!
I've tried to create pull request for this example but failed due permissions. https://github.com/dedoc/demo-scramble/tree/main
To reproduce please change: BookingsController
routes/api.php
Actual: http://scramble.test/docs/api#/operations/bookings.index shows response.data.foo1 http://scramble.test/docs/api#/operations/bookings.indexFoo shows response.data.foo1
Expected: http://scramble.test/docs/api#/operations/bookings.index shows response.data.foo1 http://scramble.test/docs/api#/operations/bookings.indexFoo shows response.data.foo2