grape-swagger
grape-swagger copied to clipboard
`hidden` setting won't work for grape's default 404 handler
Hi.
I'm running an application which uses grape v1.1.0 and grape-swagger v0.27.3. In my application I'm using grape's functionality for handling all 404's.
When I'm trying to access /swagger_doc
I'm getting an undefined method '[]' for nil:NilClass
error on GrapeSwagger::DocMethods::StatusCodes.get[route.request_method.downcase.to_sym]
.
The reason is obviously the missing request method as it is converted to *
when using route(:any)
.
Since I don't even need the default 404 handler in my swagger documentation, I tried adding a hidden: true
setting to the route (both in the description and using the route_setting
method) but it doesn't seem to work.
Is there any way to get this working? Thanks in advance.