-
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
DSL::Desc hash options are overriden by initializing them in block #706
base: master
Are you sure you want to change the base?
Conversation
def app | ||
Class.new(Grape::API) do | ||
desc 'Show this endpoint', nickname: 'simple' | ||
desc 'Show this endpoint', nickname: 'simple' do | ||
success Test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
success overrides nickname so nickname is set to default value now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ysv Hash options combined with block options is deprecated. We shouldn't do that. Instead, use
desc 'Show this endpoint', nickname: 'simple', success: Test
or
desc 'Show this endpoint' do
nickname 'simple'
success Test
end
The test will pass.
closed in ruby-grape/grape#1791 |
We should get this test merged after a passing build. Want to clean it up @ysv? |
No description provided.