krakenjs/hapi-openapi

How to consume application/xml

Nox-404 opened this issue · 3 comments

Hello,
when I try to consume application/xml I only get a Unsupported Media Type
Is there a way to set onPostAuth on some routes to convert those XML into JSON to avoid that problem ?

I suspect because hapi does not provide application/xml parsing support.

However, I believe a change is required in this module to disable parsing on unhandled media types so that they can be parsed manually.

Although I shudder at xml in Node.js ;) I will label this as an enhancement and address the above.

x-hapi-options can be used on the route to disable parsing FYI.

I'll close the issue, x-hapi-options works for me