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
+
+# 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
+
+# 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 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 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 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 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;
+
+
+
+# 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 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
2018 at 1:30 PM César Hernández Mendoza <
> > > > > > >>>> cesargu...@gmail.com> wrote:
> > > > > > >>>>
> > > > > > >>>>> >
> > > > > > >>>>> > I thin
gt;>>>> > In my opinion this is a big problem that makes us strongly
> > > > > >>>>> incompatible
> > > > > >>>>> > with the standard.
> > > > > >>>>>
> >
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
t;
> > > > >>>>> > I think regardless of what the MicroProfile team decides, we
> > need
> > > > to
> > > > >>>>> make
> > > > >>>>> > it work as the specification says. Then iterate
>> > 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
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.
> > >>>>> > >
> > >>>>
ue (*/*, html, xml
> at
> >>>>> > least).
> >>>>> > >
> >>>>> > > So yes we can make this value confifurable but this never
> happens.
> >>>>> Ivan's
> >>>>> > > case was even with
> 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
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.
>>>>
; default so
>>>> > it
>>>> > > wouldnt help I think.
>>>> > >
>>>> > > Le ven. 30 nov. 2018 06:21, John D. Ament a
>>>> > écrit
>>>> > > :
>>>> > >
>>>> > > > Th
; 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
> 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?
>> > > >
> > > > 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
>
, 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
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
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
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
/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
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
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
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
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,
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,
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
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
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?
35 matches
Mail list logo