jhthorsen / mojolicious-plugin-openapi

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

fix default error template lookup by mode #93

Closed preaction closed 6 years ago

preaction commented 6 years ago

By default, Mojolicious will first try to find not_found.$mode.$format.* before trying not_found.$format.*. Somehow, the plugin was preventing that, but adding back one of the checks from v1.30 fixes it.

This fixes one of the problems that 2.00 causes in Yancy. See https://github.com/preaction/Yancy/issues/18 and http://www.cpantesters.org/cpan/report/0f7cb956-c4c9-11e8-8f89-a365089b717b This change fixes the t/standalone.t test failure.

jhthorsen commented 6 years ago

I like it! It will probably also fix #91.

But could you tidy the code?

preaction commented 6 years ago

The code has been tidied now

jhthorsen commented 6 years ago

Awesome! 👍