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

Cannot use both body_name and detail with desc #655

Closed
magni- opened this issue Dec 6, 2017 · 3 comments
Closed

Cannot use both body_name and detail with desc #655

magni- opened this issue Dec 6, 2017 · 3 comments
Labels

Comments

@magni-
Copy link
Contributor

magni- commented Dec 6, 2017

desc 'Create a foo', body_name: 'Body' do
  detail 'This endpoint is used to create foos'
end
post ...

This totally ignores the body_name setting.

desc 'Create a foo' do
  body_name 'Body'
  detail 'This endpoint is used to create foos'
end
post ...

This blows up: NoMethodError: undefined method 'body_name'

Is there a way to use both?

@tamvm
Copy link

tamvm commented Oct 22, 2018

I found the same bug here. If we declare detail block, the rest of params in desc (such as: summary, tags...) will be ignored.

@tamvm
Copy link

tamvm commented Oct 22, 2018

I found that you need to declare without block, I mean

desc 'Create a foo', body_name: 'Body', detail: "Hello"

@dblock dblock added the bug? label Oct 22, 2018
@magni-
Copy link
Contributor Author

magni- commented Oct 20, 2021

This was fixed in Grape 1.2.2 (see ruby-grape/grape#1832)

@magni- magni- closed this as completed Oct 20, 2021
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