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 #705

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

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

ysv opened this issue Sep 12, 2018 · 2 comments

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 ?

@ysv
Copy link
Author

ysv commented Sep 12, 2018

related to #706

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

Support `summary`, `hidden`, `deprecated`, `is_array`, `nickname`,
`produces`, `consumes`, `tags` options in desc block.
@ysv
Copy link
Author

ysv commented Sep 17, 2018

closed in ruby-grape/grape#1791

@ysv ysv closed this as completed Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant