jhthorsen / mojolicious-plugin-openapi

OpenAPI / Swagger plugin for Mojolicious
53 stars 41 forks source link

Mojolicious::Lite silently ignores controller configurations due to missing default namespaces #246

Open XSven opened 9 months ago

XSven commented 9 months ago
<Mojolicious::Lite application> eval -V 'app->routes->namespaces'
[]

Actual behavior

No information about my incomplete setup was provided. As a Mojolicious newbie this was an annoying experience.

jhthorsen commented 8 months ago

I'm not sure what you want. Are you expecting something else than 404 Not Found?

XSven commented 8 months ago

I have properly configured the OpenAPI plugin using the op_spec_to_route attribute and I have used the location suggested by the mojo tool (at the time the Mojolicious::Lite was created) to store the controller. I am missing a warning that tells me that the configuration is incomplete due to

<Mojolicious::Lite application> eval -V 'app->routes->namespaces'
[]

or even better the Controller location suggested by the mojo tool should be a member of the namespaces array.