jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
54 stars 44 forks source link

Ambigious error message #71

Closed KES777 closed 6 years ago

KES777 commented 6 years ago

"Using default_handler to render data since 'openapi' was not found in stash. Set 'handler' in stash to avoid this message."

Do you mean set 'openapi' in stash?

jhthorsen commented 6 years ago

No, I mean handler. The thing is that "handler" variable is set to "openapi", but when that renderer is called, it does not find any "openapi" key set in the stash which makes it confused.

KES777 commented 6 years ago

in any case falling back to default 'html' for request to API is not good idea (except for development)

jhthorsen commented 6 years ago

This is not an issue in the plugin, it's an issue in your code. I cannot guess what you want to render, unless you tell your application that.