Please share the ticket here Romain, so everybody can follow. On Thu, Nov 29, 2018 at 3:16 PM Bruno Baptista <[email protected]> wrote:
> +1 on getting an MP clarification on this. > Bruno Baptista > https://twitter.com/brunobat_ > > > On 29/11/18 17:10, Romain Manni-Bucau wrote: > > Well the point is not much what the spec says, the implementation supports > all that since it lets the writer setup be done in the integrations if > needed. > > See it from the point of view of the lib: > > 1. 99% of the case will be json and json is well set up for microprofile > 2. yaml libs are different for most servers so no reason to impose one or > even make it conflicting > > => the integration needs to customize the writers if needed > > In the lib the most we could do is to not default to json if the mediatype > is null adding a config to default to yaml but often yaml writer don't > answer to text/yaml so not sure it would be good for users. I will open a > MP ticket about 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 à 18:07, Bruno Baptista <[email protected]> a > écrit : > >> Hi Romain, >> >> Independent of the implementation details, if we have to specify the >> accept header with "text/yaml", the response in not *yaml by default* >> like the spec says... right? >> >> Ivan, Is there a test in the TCK to make sure the default is yaml? >> >> Cheers >> Bruno Baptista >> https://twitter.com/brunobat_ >> >> >> >> >> On 29/11/18 16:58, Romain Manni-Bucau wrote: >> >> 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 <[email protected]> >> 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? >>> >>
