jhthorsen / mojolicious-plugin-openapi

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

OpenAPI plugin breaks other plugins if change app->renderer->default_handler #91

Closed elcamlost closed 6 years ago

elcamlost commented 6 years ago

We have a lite app Changing default_handler from ep to something else leads to unexpected behaviour - Minion::Admin plugin stops to work correctly.

The reason of this behavior lies here.

Mojolicious::Controller should not pass handler option to Mojolicious::Renderer if we want to use handler auto-detection feature. OpenAPI plugin always alter handler option to default for non openapi routes and it breaks handler detection.

elcamlost commented 6 years ago

https://github.com/elcamlost/mojolicious-plugin-openapi/commit/eb95742b8785b1130f15f437784bbcc816e929ec

Looks like this change fixes it.

But I'm pretty sure, that it's not good idea delete something from stash like that.

jhthorsen commented 6 years ago

This will be fixed by #93.