jhthorsen / mojolicious-plugin-openapi

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

Response's content_type is text/html when rendering (openapi => undef) #256

Closed akarelas closed 4 hours ago

akarelas commented 4 hours ago

When I $self->render(openapi => \%hash) I get content-type JSON in response, which is good.

But when I $self->render(openapi => true, false or null) I get content type text/html in the response, even if the route's spec says:

produces    => [ 'application/json' ]

Shouldn't content-type be json in the latter case?

akarelas commented 4 hours ago

Need to test this more, sorry, closing for now.