Closed nexxus-vi closed 5 months ago
@PanosCodes do you think it would make sense to add this to the returns
-DSL now?
I am also in need of it for this exact use-case.
Would also be great if there would be some way to add this in a reusable pattern.
returns(array_of: Company::ApiDescription, headers: pagy_headers)
def index
end
where we could implement pagy_headers
just like a hash or even a param_group.
def pagy_headers
[
{ key: "Link", description: "Relative links according to RFC..:"},
{ key: "Current-Page", description: "The current page in the pagination")},
...
]
end
Sure, what do to you think about https://github.com/Apipie/apipie-rails/pull/924
released in v1.4.0
Hi, i'm using pagy in an API Only project to paginate model's index. This gem provides additional header in response, such as
Now i can add headers for request like this:
but how about headers for response?