-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the bug where 'is_array' in the return entity is ignored. #206
Conversation
…roperly shows array of entities.
This needs tests and a CHANGELOG entry, please. |
Bump @igormoochnick |
this doesn't work with grape new dsl, is there any way to use for new dsl? desc 'blah blah' do
# how to make grape-swagger generate array of TeamRecord
success API::Entities::TeamRecord
end
get '/' do
records = ...
present records, using API::Entities::TeamRecord
end |
@calfzhou If it doesn't work on HEAD, it's a legit feature request. |
I'm also interested in this pull request. What is missing for integration into master ? it's only the CHANGELOG ? ... I can do it if need ! |
It needs tests and a changelog, please feel free to finish this @frodrigo. |
Fixed in tim-vandecasteele@768454b. |
Does this feature work now?
but the Response Class does not show as a array |
Is this supported in the new DSL? See calfzhou's question: #206 (comment) Something like:
|
yeap, see: #defining-an-endpoint-as-an-array |
OK, thanks that works. However, it requires passing a Hash instead of using the DSL. If I use both, I get the following deprecation warning:
Example code:
|
it should also be working with a block |
When the entity is marked with 'is_array', swagger will show it as array of entities. Example: