Skip to content
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

is_array is not supported if we pass options as a block to desc #1789

Closed
ysv opened this issue Sep 12, 2018 · 5 comments
Closed

is_array is not supported if we pass options as a block to desc #1789

ysv opened this issue Sep 12, 2018 · 5 comments
Labels

Comments

@ysv
Copy link

ysv commented Sep 12, 2018

Old style desc works well for me

desc 'Get list of user accounts',
  is_array: true,
  success: Entities::Account

But since passing it via hash is deprecated I've tried to pass it via block and it didn't work for me

desc 'Get list of user accounts' do
  success Entities::Account
  is_array true
end

same for this

desc 'Get list of user accounts', is_array: true do
  success Entities::Account
end

How array response should be described in documentation using block ?

@dblock dblock added the bug? label Sep 12, 2018
@dblock
Copy link
Member

dblock commented Sep 12, 2018

Probably just an omission, try writing a spec/fix?

@ysv
Copy link
Author

ysv commented Sep 12, 2018

@dblock let me try to make it

@ysv
Copy link
Author

ysv commented Sep 12, 2018

related to ruby-grape/grape-swagger#705

@darren987469
Copy link
Contributor

@ysv Do you mind I try it?

@ysv
Copy link
Author

ysv commented Sep 15, 2018

@darren987469 you are welcome

darren987469 added a commit to darren987469/grape that referenced this issue Sep 15, 2018
Fix ruby-grape#1789.

Support `summary`, `hidden`, `deprecated`, `is_array`, `nickname`,
`produces`, `consumes`, `tags` options in desc block.
darren987469 added a commit to darren987469/grape that referenced this issue Sep 15, 2018
…y`, `hidden`, `deprecated`, `is_array`, `nickname`,`produces`, `consumes`, `tags` options in desc block.
dblock pushed a commit that referenced this issue Sep 16, 2018
* Support more options in desc blockFix #1789.Support `summary`, `hidden`, `deprecated`, `is_array`, `nickname`,`produces`, `consumes`, `tags` options in desc block.

* Fix rubocop and update CHANGELOG

* Refine documentation [ci skip]

Add real mime type in README.
Add options documentation in `desc`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants