You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found the is_array in the desc parameter for an API endpoint to specify an array as response. But I didn't find how to specify that in the http_codes part, something like:
desc "List All Delivery",
is_array: true,
entity: ::Delivery::Entity,
http_codes: [
[200, 'OK', ::Delivery::Entity],
[401, 'Unauthorized', API::Entities::Error],
[403, 'Forbidden', API::Entities::Error]
]
get do
present(paginate(::Delivery.all),
with: ::Delivery::Entity)
end
The generated Swagger documentation is my code makes you think the 200 response will give you a Hash but it won't, it's an array. Is there a way to do that?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi everyone,
I found the
is_array
in thedesc
parameter for an API endpoint to specify an array as response. But I didn't find how to specify that in thehttp_codes
part, something like:The generated Swagger documentation is my code makes you think the
200
response will give you a Hash but it won't, it's an array. Is there a way to do that?Thanks.
The text was updated successfully, but these errors were encountered: