params are not loading when defined both in desc block and separate params block
Desc block params are not loading when defined with separate params block, e.g.
desc "Create a User.", {
headers: {'XAuthToken': {required: true}},
params: Entities::UserEntity.documentation
}
params do
optional :extra_parameter, type: String
end
In above case only extra_parameter and header field are visible. This worked well previously by showing all desc block params field with separate params block field.
This code works well by displaying header field with optional extra_parameter
desc "Create a User.", {
headers: {'XAuthToken': {required: true}},
}
params do
optional :extra_parameter, type: String
end
but below code only shows params field and not header field (I have removed extra param block)
desc "Create a User.", {
headers: {'XAuthToken': {required: true}},
params: Entities::UserEntity.documentation
}
I think this is a bug. What you guys think.
@brahamshakti … think, these params should internally be added to route.[route_]params
@brahamshakti … I investigated a bit and found no way to do it on grape-swagger side, cause it is a grape option for the desc block, see: desc.rb and we should not overwrite grape behaviour