Additional collection’s data won't be documented when using with paginated responses
mammadataei opened this issue · 1 comments
mammadataei commented
Scramble ignores the additional collection data (i.e. insight), I think because of paginated response annotation.
class UserController
{
/**
* @response AnonymousResourceCollection<LengthAwarePaginator<UserResource>>
*/
public function index(Request $request)
{
return UserResource::collection(User::paginate())
->additional([
'insight' => [
'roles' => [
'admin' => 0,
'user' => 0,
],
],
]);
}
}
romalytvynenko commented
@mammadataei this is really a great catch