[GitHub] tomee issue #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread puneethps
Github user puneethps commented on the issue: https://github.com/apache/tomee/pull/340 I noticed one more difference from the spec and the implementation, what I understood from the spec was that there is supposed to be a components field in the yaml or the json if there is a schema

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread puneethps
+ +# Microprofile OpenAPI +This is an example on how to use microprofile OpenAPI in TomEE. + +== Run the application: +mvn clean install tomee:run + +Within the application there is an endpoint that will give you weather based on day. + +== Request

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
+ +# Microprofile OpenAPI +This is an example on how to use microprofile OpenAPI in TomEE. + +== Run the application: +mvn clean install tomee:run + +Within the application there is an endpoint that will give you weather based on day. + +== Request

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
Github user ivanjunckes commented on a diff in the pull request: https://github.com/apache/tomee/pull/340#discussion_r244725387 --- Diff: examples/mp-openapi/src/main/java/org/superbiz/openapi/WeatherService.java --- @@ -0,0 +1,52 @@ +package org.superbiz.openapi; + +

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
Github user ivanjunckes commented on a diff in the pull request: https://github.com/apache/tomee/pull/340#discussion_r244725773 --- Diff: examples/mp-openapi/src/main/java/org/superbiz/openapi/WeatherService.java --- @@ -0,0 +1,52 @@ +package org.superbiz.openapi; + +

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
Github user ivanjunckes commented on a diff in the pull request: https://github.com/apache/tomee/pull/340#discussion_r244725584 --- Diff: examples/mp-openapi/src/main/java/org/superbiz/openapi/Weather.java --- @@ -0,0 +1,25 @@ +package org.superbiz.openapi; + +import

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
Github user ivanjunckes commented on a diff in the pull request: https://github.com/apache/tomee/pull/340#discussion_r244723832 --- Diff: examples/mp-openapi/src/main/java/org/superbiz/openapi/WeatherService.java --- @@ -0,0 +1,52 @@ +package org.superbiz.openapi; + +

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-02 Thread ivanjunckes
+ +# Microprofile OpenAPI +This is an example on how to use microprofile OpenAPI in TomEE. + +== Run the application: +mvn clean install tomee:run + +Within the application there is an endpoint that will give you weather based on day. + +== Request

[GitHub] tomee pull request #340: TOMEE-2289 microprofile openAPI example

2019-01-01 Thread puneethps
GitHub user puneethps opened a pull request: https://github.com/apache/tomee/pull/340 TOMEE-2289 microprofile openAPI example The JIRA status for TOMEE-2289 hasn't changed for quite sometime so I felt I could add a new project for this. Can someone please review the PR

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
2018 at 1:30 PM César Hernández Mendoza < > > > > > > >>>> cesargu...@gmail.com> wrote: > > > > > > >>>> > > > > > > >>>>> > > > > > > > >>>>> > I thin

Re: Microprofile OpenAPI

2018-11-30 Thread César Hernández Mendoza
gt;>>>> > In my opinion this is a big problem that makes us strongly > > > > > >>>>> incompatible > > > > > >>>>> > with the standard. > > > > > >>>>> > >

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
all clients default to */* or octect/stream so the > > >>>>> else is > > >>>>> > > never used normally and was here just to put a mimetype from an > > >>>>> optional. > > >>>>> > > &g

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
t; > > > > >>>>> > I think regardless of what the MicroProfile team decides, we > > need > > > > to > > > > >>>>> make > > > > >>>>> > it work as the specification says. Then iterate

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
>> > In my opinion this is a big problem that makes us strongly > > > >>>>> incompatible > > > >>>>> > with the standard. > > > >>>>> > > > > >>>>> > On Fri, Nov 30, 2018 at 3:36 AM Romain Manni-B

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
l clients default to */* or octect/stream so the > > >>>>> else is > > >>>>> > > never used normally and was here just to put a mimetype from an > > >>>>> optional. > > >>>>> > > > > >>>>

Re: Microprofile OpenAPI

2018-11-30 Thread Richard Monson-Haefel
ue (*/*, html, xml > at > >>>>> > least). > >>>>> > > > >>>>> > > So yes we can make this value confifurable but this never > happens. > >>>>> Ivan's > >>>>> > > case was even with

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
> Browsers even send a kind of "all you can" value (*/*, html, xml >>>>>> at >>>>>> > least). >>>>>> > > >>>>>> > > So yes we can make this value confifurable but this never >>&g

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
is value confifurable but this never happens. >>>>> Ivan's >>>>> > > case was even with cxf client which sets a value normally by >>>>> default so >>>>> > it >>>>> > > wouldnt help I think. >>>>

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
; default so >>>> > it >>>> > > wouldnt help I think. >>>> > > >>>> > > Le ven. 30 nov. 2018 06:21, John D. Ament a >>>> > écrit >>>> > > : >>>> > > >>>> > > > Th

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
; The question posed to the MP team does not really match the >>> question >>> > > > posted here, and seems to be a tangental ask. >>> > > > >>> > > > The problem is this line of code [1], and nothing to do with >>&g

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
> The problem is this line of code [1], and nothing to do with TomEE's >> > > > behavior; it defaults to JSON even though the spec states it should >> be >> > > > YAML. Perhaps a clean solution would be to make this a config >> setting? >> > > >

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
> > > > YAML. Perhaps a clean solution would be to make this a config > setting? > > > > But seems like there's a missing TCK test as well. I'd also question > > > when > > > > a browser goes here, what does it send in the Accepts header. My > guess >

Re: Microprofile OpenAPI

2018-11-30 Thread César Hernández Mendoza
, what does it send in the Accepts header. My guess > > is > > > most modern browsers send text/html which also wouldn't line up. > > > > > > John > > > > > > [1]: > > > > > > https://github.com/apache/geronimo-openapi/blob/master

Re: Microprofile OpenAPI

2018-11-30 Thread Romain Manni-Bucau
ution would be to make this a config setting? >> > But seems like there's a missing TCK test as well. I'd also question >> when >> > a browser goes here, what does it send in the Accepts header. My guess >> is >> > most modern browsers send text/html which also wou

Re: Microprofile OpenAPI

2018-11-30 Thread Ivan Junckes Filho
than this very specific spec). > >> > >> Le jeu. 29 nov. 2018 21:39, Jonathan Gallimore < > >> jonathan.gallim...@gmail.com> a écrit : > >> > >>> If the spec requires that, then I'd expect to get a YAML response if > >>> making a reque

Re: Microprofile OpenAPI

2018-11-29 Thread Romain Manni-Bucau
gt; a browser goes here, what does it send in the Accepts header. My guess is > most modern browsers send text/html which also wouldn't line up. > > John > > [1]: > https://github.com/apache/geronimo-openapi/blob/master/geronimo-openapi-impl/src/main/java/org/apache/geroni

Re: Microprofile OpenAPI

2018-11-29 Thread John D. Ament
/blob/master/geronimo-openapi-impl/src/main/java/org/apache/geronimo/microprofile/openapi/jaxrs/OpenAPIFilter.java#L57 On Thu, Nov 29, 2018 at 3:58 PM Romain Manni-Bucau wrote: > Response is fine (thanks jaxrs), request is up to jaxrs runtime so depends > where you deploy it (i dont

Re: Microprofile OpenAPI

2018-11-29 Thread Romain Manni-Bucau
Gallimore a écrit : > If the spec requires that, then I'd expect to get a YAML response if > making a request without an `Accept` header on the request. > > I haven't looked through the microprofile-openapi TCK, but I'd expect that > to be tested, and I'd suggest cont

Re: Microprofile OpenAPI

2018-11-29 Thread Jonathan Gallimore
If the spec requires that, then I'd expect to get a YAML response if making a request without an `Accept` header on the request. I haven't looked through the microprofile-openapi TCK, but I'd expect that to be tested, and I'd suggest contributing a test there if there isn't one. If you wanted

Re: Microprofile OpenAPI

2018-11-29 Thread Richard Monson-Haefel
gt; > > > Hey Romain, take a look on: > > > > > > > > > > > > https://download.eclipse.org/microprofile/microprofile-open-api-1.0/microprofile-openapi-spec.html#_content_format > > > > > > It is clear for me there, that the def

Re: Microprofile OpenAPI

2018-11-29 Thread Romain Manni-Bucau
Nov 29, 2018 at 11:03 AM Ivan Junckes Filho > > wrote: > > > Hey Romain, take a look on: > > > > > > > https://download.eclipse.org/microprofile/microprofile-open-api-1.0/microprofile-openapi-spec.html#_content_format > > > > It is clear for me there,

Re: Microprofile OpenAPI

2018-11-29 Thread Richard Monson-Haefel
roprofile-open-api-1.0/microprofile-openapi-spec.html#_content_format > > It is clear for me there, that the default should be yaml. > > On Thu, Nov 29, 2018 at 2:58 PM Romain Manni-Bucau > wrote: > > > Hello Ivan, > > > > this is actually not exactly the case,

Re: Microprofile OpenAPI

2018-11-29 Thread Romain Manni-Bucau
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

Re: Microprofile OpenAPI

2018-11-29 Thread Ivan Junckes Filho
Hey Romain, take a look on: https://download.eclipse.org/microprofile/microprofile-open-api-1.0/microprofile-openapi-spec.html#_content_format It is clear for me there, that the default should be yaml. On Thu, Nov 29, 2018 at 2:58 PM Romain Manni-Bucau wrote: > Hello I

Microprofile OpenAPI

2018-11-29 Thread Ivan Junckes Filho
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?