grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

`hidden` setting won't work for grape's default 404 handler

Open cohenor opened this issue 5 years ago • 0 comments

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.

cohenor avatar Jul 31 '19 16:07 cohenor