Hello Ivan,

this is actually not exactly the case, the impl is writer agnostic and
fully relies on JAXRS for that so if you have a body writer which matches
OpenAPI and returns yaml by default or
which prefer yaml over json then you will have the behavior you describe.

To get yaml you can send the Accept header valued with yaml media type like
"text/yaml" for some implementations.

Side note: the impl does not impose any body writer to be integrable in any
environment and does not enforce yaml as well cause it is not part of the
core of microprofile (and hopefully will never be) so no reason to import a
lib (which can be heavy and potentially with vulnerabilities + work for the
users to maintain it) for that.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 29 nov. 2018 à 17:50, Ivan Junckes Filho <ivanjunc...@gmail.com> a
écrit :

> Hey guys, I think I found a bug in OpenAPI implementation.
>
> The spec says:
> "The default format of the /openapi endpoint is YAML."
>
> But when I try to access /openapi it returns JSON by default.
>
> This is not correct.
>
> Also how can I access yaml if it is not default?
>

Reply via email to