dedoc/scramble

Additional collection’s data won't be documented when using with paginated responses

mammadataei opened this issue · 1 comments

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,
                    ],
                ],
            ]);
    }
}

@mammadataei this is really a great catch