Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-28 Thread Jonathan Gallimore
Even after putting back
SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
"false");, this still has multiple failures across health, metrics and
OpenAPI. I'll retest it again, but I'd be grateful for another pair of eyes.

Thanks

Jon

On Tue, May 28, 2019 at 2:52 PM Jonathan Gallimore <
jonathan.gallim...@gmail.com> wrote:

> Looking back at this one. I reverted the removal of the system property -
> I think we can address this in another PR. Hoping I can merge this one
> shortly.
>
> Jon
>
> On Fri, May 17, 2019 at 12:33 PM Ivan Junckes Filho 
> wrote:
>
>> Hi Jon, I understood differently. I thought it was green and ready to be
>> merged that is why I pushed.
>>
>> Sorry about that! No hurry, then. I will see if I can get some time to
>> look
>> into this.
>>
>>
>>
>> On Thu, May 16, 2019 at 10:39 AM Jonathan Gallimore <
>> jonathan.gallim...@gmail.com> wrote:
>>
>> > Currently there's a handful of tests that fail with this PR. If you're
>> able
>> > to help unpick the issues, that would be great.
>> >
>> > Jon
>> >
>> > On Thu, May 16, 2019 at 1:48 PM Ivan Junckes Filho <
>> ivanjunc...@gmail.com>
>> > wrote:
>> >
>> > > Awesome, Jon. Thanks a lot for making the test.
>> > >
>> > > Would be awesome if we can get this in M3.
>> > >
>> > > On Thu, May 16, 2019 at 9:31 AM Jonathan Gallimore <
>> > > jonathan.gallim...@gmail.com> wrote:
>> > >
>> > > > I built a test: https://github.com/apache/tomee/pull/467, and tried
>> > the
>> > > PR
>> > > > with
>> > > > the
>> > SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
>> > > > "false"); line removed. The PR fixes the test (great). Removing the
>> > > > property looks like it potentially has other impacts - at least one
>> > test
>> > > in
>> > > > OpenAPI, and a handful of tests across health and metrics, which I'm
>> > > > looking in to.
>> > > >
>> > > > Jon
>> > > >
>> > > > On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
>> > > > jonathan.gallim...@gmail.com> wrote:
>> > > >
>> > > > > Thanks. That helps a lot. Definitely different to what we're
>> seeing
>> > > with
>> > > > > the .war file that the TCK uses. I'll take a look at that with a
>> > > > debugger.
>> > > > >
>> > > > > Jon
>> > > > >
>> > > > > On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho <
>> > > > ivanjunc...@gmail.com>
>> > > > > wrote:
>> > > > >
>> > > > >> Jon, thank you for helping out with this.
>> > > > >>
>> > > > >> I created a sample project with the description of the issue and
>> how
>> > > to
>> > > > >> reproduce it.
>> > > > >>
>> > > > >> See here: https://github.com/ivanjunckes/openapi_sample
>> > > > >>
>> > > > >> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
>> > > > >> jonathan.gallim...@gmail.com> wrote:
>> > > > >>
>> > > > >> > I built master (without this PR), and deployed the .war file
>> that
>> > > the
>> > > > >> > openapi-tck creates, which includes this class:
>> > > > >> >
>> > > > >>
>> > > >
>> > >
>> >
>> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
>> > > > >> (.war
>> > > > >> > file attached - not sure if it'll make it through to the
>> mailing
>> > > list
>> > > > or
>> > > > >> > not).
>> > > > >> >
>> > > > >> > Here's the full output for a call to /openapi:
>> > > > >> >
>> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
>> > > > >> >
>> > > > >> > Note under "info" I get:
>> > > > >> >
>> > > > >> > ---
>> > > > >> > info:
>> > > > >> >   version: "1.0"
>> > > > >> >   description: ""
>> > > > >> >   license:
>> > > > >> > name: "Apache 2.0"
>> > > > >> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
>> > > > >> >   contact:
>> > > > >> > name: "AirlinesRatingApp API Support"
>> > > > >> > email: "techsupp...@airlinesratingapp.com"
>> > > > >> > url: "http://exampleurl.com/contact";
>> > > > >> >   termsOfService: "http://airlinesratingapp.com/terms";
>> > > > >> >   title: "AirlinesRatingApp API"
>> > > > >> > security:
>> > > > >> > - airlinesRatingApp_auth: []
>> > > > >> > tags:
>> > > > >> > - name: "user"
>> > > > >> >   description: "Operations about user"
>> > > > >> > ---
>> > > > >> >
>> > > > >> > At this point, I'm not sure what the PR fixes. It looks like
>> its
>> > > > working
>> > > > >> > ok out of the box. I think we need more detail on the actual
>> > error.
>> > > If
>> > > > >> you
>> > > > >> > can't include a test in the PR, perhaps you could provide a
>> sample
>> > > app
>> > > > >> that
>> > > > >> > reproduces the problem, along with the expected and actual
>> output
>> > on
>> > > > >> both
>> > > > >> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
>> > > > >> >
>> > > > >> > I did try 8.0.0-M2 with same app from the TCK, which gives a
>> > > > deployment
>> > > > >> > error and a HTTP 500 error at runtime. Not a great result, but
>> an
>> > > > >> entirely
>> > > > >> > different error I think.

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-28 Thread Jonathan Gallimore
Looking back at this one. I reverted the removal of the system property - I
think we can address this in another PR. Hoping I can merge this one
shortly.

Jon

On Fri, May 17, 2019 at 12:33 PM Ivan Junckes Filho 
wrote:

> Hi Jon, I understood differently. I thought it was green and ready to be
> merged that is why I pushed.
>
> Sorry about that! No hurry, then. I will see if I can get some time to look
> into this.
>
>
>
> On Thu, May 16, 2019 at 10:39 AM Jonathan Gallimore <
> jonathan.gallim...@gmail.com> wrote:
>
> > Currently there's a handful of tests that fail with this PR. If you're
> able
> > to help unpick the issues, that would be great.
> >
> > Jon
> >
> > On Thu, May 16, 2019 at 1:48 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com>
> > wrote:
> >
> > > Awesome, Jon. Thanks a lot for making the test.
> > >
> > > Would be awesome if we can get this in M3.
> > >
> > > On Thu, May 16, 2019 at 9:31 AM Jonathan Gallimore <
> > > jonathan.gallim...@gmail.com> wrote:
> > >
> > > > I built a test: https://github.com/apache/tomee/pull/467, and tried
> > the
> > > PR
> > > > with
> > > > the
> > SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
> > > > "false"); line removed. The PR fixes the test (great). Removing the
> > > > property looks like it potentially has other impacts - at least one
> > test
> > > in
> > > > OpenAPI, and a handful of tests across health and metrics, which I'm
> > > > looking in to.
> > > >
> > > > Jon
> > > >
> > > > On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
> > > > jonathan.gallim...@gmail.com> wrote:
> > > >
> > > > > Thanks. That helps a lot. Definitely different to what we're seeing
> > > with
> > > > > the .war file that the TCK uses. I'll take a look at that with a
> > > > debugger.
> > > > >
> > > > > Jon
> > > > >
> > > > > On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho <
> > > > ivanjunc...@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> Jon, thank you for helping out with this.
> > > > >>
> > > > >> I created a sample project with the description of the issue and
> how
> > > to
> > > > >> reproduce it.
> > > > >>
> > > > >> See here: https://github.com/ivanjunckes/openapi_sample
> > > > >>
> > > > >> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
> > > > >> jonathan.gallim...@gmail.com> wrote:
> > > > >>
> > > > >> > I built master (without this PR), and deployed the .war file
> that
> > > the
> > > > >> > openapi-tck creates, which includes this class:
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
> > > > >> (.war
> > > > >> > file attached - not sure if it'll make it through to the mailing
> > > list
> > > > or
> > > > >> > not).
> > > > >> >
> > > > >> > Here's the full output for a call to /openapi:
> > > > >> >
> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
> > > > >> >
> > > > >> > Note under "info" I get:
> > > > >> >
> > > > >> > ---
> > > > >> > info:
> > > > >> >   version: "1.0"
> > > > >> >   description: ""
> > > > >> >   license:
> > > > >> > name: "Apache 2.0"
> > > > >> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
> > > > >> >   contact:
> > > > >> > name: "AirlinesRatingApp API Support"
> > > > >> > email: "techsupp...@airlinesratingapp.com"
> > > > >> > url: "http://exampleurl.com/contact";
> > > > >> >   termsOfService: "http://airlinesratingapp.com/terms";
> > > > >> >   title: "AirlinesRatingApp API"
> > > > >> > security:
> > > > >> > - airlinesRatingApp_auth: []
> > > > >> > tags:
> > > > >> > - name: "user"
> > > > >> >   description: "Operations about user"
> > > > >> > ---
> > > > >> >
> > > > >> > At this point, I'm not sure what the PR fixes. It looks like its
> > > > working
> > > > >> > ok out of the box. I think we need more detail on the actual
> > error.
> > > If
> > > > >> you
> > > > >> > can't include a test in the PR, perhaps you could provide a
> sample
> > > app
> > > > >> that
> > > > >> > reproduces the problem, along with the expected and actual
> output
> > on
> > > > >> both
> > > > >> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
> > > > >> >
> > > > >> > I did try 8.0.0-M2 with same app from the TCK, which gives a
> > > > deployment
> > > > >> > error and a HTTP 500 error at runtime. Not a great result, but
> an
> > > > >> entirely
> > > > >> > different error I think. Full exception below.
> > > > >> >
> > > > >> > Jon
> > > > >> >
> > > > >> > 15-May-2019 10:48:24.459 INFO [main]
> > > > >> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode
> > for
> > > > >> >
> > > > >>
> > > >
> > >
> >
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> > > > >> > looking all classes to find CDI beans, maybe think to add a
> > > beans.xml
> > > > if
> > > > >> > not there or add the jar to exclusions.list

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-17 Thread Ivan Junckes Filho
Hi Jon, I understood differently. I thought it was green and ready to be
merged that is why I pushed.

Sorry about that! No hurry, then. I will see if I can get some time to look
into this.



On Thu, May 16, 2019 at 10:39 AM Jonathan Gallimore <
jonathan.gallim...@gmail.com> wrote:

> Currently there's a handful of tests that fail with this PR. If you're able
> to help unpick the issues, that would be great.
>
> Jon
>
> On Thu, May 16, 2019 at 1:48 PM Ivan Junckes Filho 
> wrote:
>
> > Awesome, Jon. Thanks a lot for making the test.
> >
> > Would be awesome if we can get this in M3.
> >
> > On Thu, May 16, 2019 at 9:31 AM Jonathan Gallimore <
> > jonathan.gallim...@gmail.com> wrote:
> >
> > > I built a test: https://github.com/apache/tomee/pull/467, and tried
> the
> > PR
> > > with
> > > the
> SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
> > > "false"); line removed. The PR fixes the test (great). Removing the
> > > property looks like it potentially has other impacts - at least one
> test
> > in
> > > OpenAPI, and a handful of tests across health and metrics, which I'm
> > > looking in to.
> > >
> > > Jon
> > >
> > > On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
> > > jonathan.gallim...@gmail.com> wrote:
> > >
> > > > Thanks. That helps a lot. Definitely different to what we're seeing
> > with
> > > > the .war file that the TCK uses. I'll take a look at that with a
> > > debugger.
> > > >
> > > > Jon
> > > >
> > > > On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho <
> > > ivanjunc...@gmail.com>
> > > > wrote:
> > > >
> > > >> Jon, thank you for helping out with this.
> > > >>
> > > >> I created a sample project with the description of the issue and how
> > to
> > > >> reproduce it.
> > > >>
> > > >> See here: https://github.com/ivanjunckes/openapi_sample
> > > >>
> > > >> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
> > > >> jonathan.gallim...@gmail.com> wrote:
> > > >>
> > > >> > I built master (without this PR), and deployed the .war file that
> > the
> > > >> > openapi-tck creates, which includes this class:
> > > >> >
> > > >>
> > >
> >
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
> > > >> (.war
> > > >> > file attached - not sure if it'll make it through to the mailing
> > list
> > > or
> > > >> > not).
> > > >> >
> > > >> > Here's the full output for a call to /openapi:
> > > >> >
> https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
> > > >> >
> > > >> > Note under "info" I get:
> > > >> >
> > > >> > ---
> > > >> > info:
> > > >> >   version: "1.0"
> > > >> >   description: ""
> > > >> >   license:
> > > >> > name: "Apache 2.0"
> > > >> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
> > > >> >   contact:
> > > >> > name: "AirlinesRatingApp API Support"
> > > >> > email: "techsupp...@airlinesratingapp.com"
> > > >> > url: "http://exampleurl.com/contact";
> > > >> >   termsOfService: "http://airlinesratingapp.com/terms";
> > > >> >   title: "AirlinesRatingApp API"
> > > >> > security:
> > > >> > - airlinesRatingApp_auth: []
> > > >> > tags:
> > > >> > - name: "user"
> > > >> >   description: "Operations about user"
> > > >> > ---
> > > >> >
> > > >> > At this point, I'm not sure what the PR fixes. It looks like its
> > > working
> > > >> > ok out of the box. I think we need more detail on the actual
> error.
> > If
> > > >> you
> > > >> > can't include a test in the PR, perhaps you could provide a sample
> > app
> > > >> that
> > > >> > reproduces the problem, along with the expected and actual output
> on
> > > >> both
> > > >> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
> > > >> >
> > > >> > I did try 8.0.0-M2 with same app from the TCK, which gives a
> > > deployment
> > > >> > error and a HTTP 500 error at runtime. Not a great result, but an
> > > >> entirely
> > > >> > different error I think. Full exception below.
> > > >> >
> > > >> > Jon
> > > >> >
> > > >> > 15-May-2019 10:48:24.459 INFO [main]
> > > >> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode
> for
> > > >> >
> > > >>
> > >
> >
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> > > >> > looking all classes to find CDI beans, maybe think to add a
> > beans.xml
> > > if
> > > >> > not there or add the jar to exclusions.list
> > > >> > 15-May-2019 10:48:25.352 INFO [main]
> > > >> > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints
> All
> > > >> > injection points were validated successfully.
> > > >> > 15-May-2019 10:48:25.377 INFO [main]
> > > >> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication
> > OpenWebBeans
> > > >> > Container has started, it took 1114 ms.
> > > >> > 15-May-2019 10:48:25.387 INFO [main]
> > > >> > org.apache.openejb.assembler.classic.Assembler.createApplication
> > > >> Deployed
> > > >> >
> > > >>
> > >

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-16 Thread Jonathan Gallimore
Currently there's a handful of tests that fail with this PR. If you're able
to help unpick the issues, that would be great.

Jon

On Thu, May 16, 2019 at 1:48 PM Ivan Junckes Filho 
wrote:

> Awesome, Jon. Thanks a lot for making the test.
>
> Would be awesome if we can get this in M3.
>
> On Thu, May 16, 2019 at 9:31 AM Jonathan Gallimore <
> jonathan.gallim...@gmail.com> wrote:
>
> > I built a test: https://github.com/apache/tomee/pull/467, and tried the
> PR
> > with
> > the SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
> > "false"); line removed. The PR fixes the test (great). Removing the
> > property looks like it potentially has other impacts - at least one test
> in
> > OpenAPI, and a handful of tests across health and metrics, which I'm
> > looking in to.
> >
> > Jon
> >
> > On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
> > jonathan.gallim...@gmail.com> wrote:
> >
> > > Thanks. That helps a lot. Definitely different to what we're seeing
> with
> > > the .war file that the TCK uses. I'll take a look at that with a
> > debugger.
> > >
> > > Jon
> > >
> > > On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho <
> > ivanjunc...@gmail.com>
> > > wrote:
> > >
> > >> Jon, thank you for helping out with this.
> > >>
> > >> I created a sample project with the description of the issue and how
> to
> > >> reproduce it.
> > >>
> > >> See here: https://github.com/ivanjunckes/openapi_sample
> > >>
> > >> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
> > >> jonathan.gallim...@gmail.com> wrote:
> > >>
> > >> > I built master (without this PR), and deployed the .war file that
> the
> > >> > openapi-tck creates, which includes this class:
> > >> >
> > >>
> >
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
> > >> (.war
> > >> > file attached - not sure if it'll make it through to the mailing
> list
> > or
> > >> > not).
> > >> >
> > >> > Here's the full output for a call to /openapi:
> > >> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
> > >> >
> > >> > Note under "info" I get:
> > >> >
> > >> > ---
> > >> > info:
> > >> >   version: "1.0"
> > >> >   description: ""
> > >> >   license:
> > >> > name: "Apache 2.0"
> > >> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
> > >> >   contact:
> > >> > name: "AirlinesRatingApp API Support"
> > >> > email: "techsupp...@airlinesratingapp.com"
> > >> > url: "http://exampleurl.com/contact";
> > >> >   termsOfService: "http://airlinesratingapp.com/terms";
> > >> >   title: "AirlinesRatingApp API"
> > >> > security:
> > >> > - airlinesRatingApp_auth: []
> > >> > tags:
> > >> > - name: "user"
> > >> >   description: "Operations about user"
> > >> > ---
> > >> >
> > >> > At this point, I'm not sure what the PR fixes. It looks like its
> > working
> > >> > ok out of the box. I think we need more detail on the actual error.
> If
> > >> you
> > >> > can't include a test in the PR, perhaps you could provide a sample
> app
> > >> that
> > >> > reproduces the problem, along with the expected and actual output on
> > >> both
> > >> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
> > >> >
> > >> > I did try 8.0.0-M2 with same app from the TCK, which gives a
> > deployment
> > >> > error and a HTTP 500 error at runtime. Not a great result, but an
> > >> entirely
> > >> > different error I think. Full exception below.
> > >> >
> > >> > Jon
> > >> >
> > >> > 15-May-2019 10:48:24.459 INFO [main]
> > >> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
> > >> >
> > >>
> >
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> > >> > looking all classes to find CDI beans, maybe think to add a
> beans.xml
> > if
> > >> > not there or add the jar to exclusions.list
> > >> > 15-May-2019 10:48:25.352 INFO [main]
> > >> > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
> > >> > injection points were validated successfully.
> > >> > 15-May-2019 10:48:25.377 INFO [main]
> > >> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication
> OpenWebBeans
> > >> > Container has started, it took 1114 ms.
> > >> > 15-May-2019 10:48:25.387 INFO [main]
> > >> > org.apache.openejb.assembler.classic.Assembler.createApplication
> > >> Deployed
> > >> >
> > >>
> >
> Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
> > >> > 15-May-2019 10:48:25.511 INFO [main]
> > >> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
> > >> > org.apache.myfaces.ee.MyFacesContainerInitializer
> > >> > 15-May-2019 10:48:25.530 INFO [main]
> > >> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
> > >> > FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
> > >> > 15-May-2019 10:48:25.542 INFO [main]
> > >> > org.apache.jasper.servlet.TldScanner.scanJars At 

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-16 Thread Ivan Junckes Filho
Awesome, Jon. Thanks a lot for making the test.

Would be awesome if we can get this in M3.

On Thu, May 16, 2019 at 9:31 AM Jonathan Gallimore <
jonathan.gallim...@gmail.com> wrote:

> I built a test: https://github.com/apache/tomee/pull/467, and tried the PR
> with
> the SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
> "false"); line removed. The PR fixes the test (great). Removing the
> property looks like it potentially has other impacts - at least one test in
> OpenAPI, and a handful of tests across health and metrics, which I'm
> looking in to.
>
> Jon
>
> On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
> jonathan.gallim...@gmail.com> wrote:
>
> > Thanks. That helps a lot. Definitely different to what we're seeing with
> > the .war file that the TCK uses. I'll take a look at that with a
> debugger.
> >
> > Jon
> >
> > On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com>
> > wrote:
> >
> >> Jon, thank you for helping out with this.
> >>
> >> I created a sample project with the description of the issue and how to
> >> reproduce it.
> >>
> >> See here: https://github.com/ivanjunckes/openapi_sample
> >>
> >> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
> >> jonathan.gallim...@gmail.com> wrote:
> >>
> >> > I built master (without this PR), and deployed the .war file that the
> >> > openapi-tck creates, which includes this class:
> >> >
> >>
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
> >> (.war
> >> > file attached - not sure if it'll make it through to the mailing list
> or
> >> > not).
> >> >
> >> > Here's the full output for a call to /openapi:
> >> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
> >> >
> >> > Note under "info" I get:
> >> >
> >> > ---
> >> > info:
> >> >   version: "1.0"
> >> >   description: ""
> >> >   license:
> >> > name: "Apache 2.0"
> >> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
> >> >   contact:
> >> > name: "AirlinesRatingApp API Support"
> >> > email: "techsupp...@airlinesratingapp.com"
> >> > url: "http://exampleurl.com/contact";
> >> >   termsOfService: "http://airlinesratingapp.com/terms";
> >> >   title: "AirlinesRatingApp API"
> >> > security:
> >> > - airlinesRatingApp_auth: []
> >> > tags:
> >> > - name: "user"
> >> >   description: "Operations about user"
> >> > ---
> >> >
> >> > At this point, I'm not sure what the PR fixes. It looks like its
> working
> >> > ok out of the box. I think we need more detail on the actual error. If
> >> you
> >> > can't include a test in the PR, perhaps you could provide a sample app
> >> that
> >> > reproduces the problem, along with the expected and actual output on
> >> both
> >> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
> >> >
> >> > I did try 8.0.0-M2 with same app from the TCK, which gives a
> deployment
> >> > error and a HTTP 500 error at runtime. Not a great result, but an
> >> entirely
> >> > different error I think. Full exception below.
> >> >
> >> > Jon
> >> >
> >> > 15-May-2019 10:48:24.459 INFO [main]
> >> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
> >> >
> >>
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> >> > looking all classes to find CDI beans, maybe think to add a beans.xml
> if
> >> > not there or add the jar to exclusions.list
> >> > 15-May-2019 10:48:25.352 INFO [main]
> >> > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
> >> > injection points were validated successfully.
> >> > 15-May-2019 10:48:25.377 INFO [main]
> >> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans
> >> > Container has started, it took 1114 ms.
> >> > 15-May-2019 10:48:25.387 INFO [main]
> >> > org.apache.openejb.assembler.classic.Assembler.createApplication
> >> Deployed
> >> >
> >>
> Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
> >> > 15-May-2019 10:48:25.511 INFO [main]
> >> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
> >> > org.apache.myfaces.ee.MyFacesContainerInitializer
> >> > 15-May-2019 10:48:25.530 INFO [main]
> >> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
> >> > FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
> >> > 15-May-2019 10:48:25.542 INFO [main]
> >> > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was
> >> scanned
> >> > for TLDs yet contained no TLDs. Enable debug logging for this logger
> >> for a
> >> > complete list of JARs that were scanned but no TLDs were found in
> them.
> >> > Skipping unneeded JARs during scanning can improve startup time and
> JSP
> >> > compilation time.
> >> > 15-May-2019 10:48:25.547 INFO [main]
> >> > org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer.addListener
> >> > Installing
> >> >
> >>

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-16 Thread Jonathan Gallimore
I built a test: https://github.com/apache/tomee/pull/467, and tried the PR
with
the SystemInstance.get().setProperty("openejb.cxf-rs.cache-application",
"false"); line removed. The PR fixes the test (great). Removing the
property looks like it potentially has other impacts - at least one test in
OpenAPI, and a handful of tests across health and metrics, which I'm
looking in to.

Jon

On Wed, May 15, 2019 at 2:43 PM Jonathan Gallimore <
jonathan.gallim...@gmail.com> wrote:

> Thanks. That helps a lot. Definitely different to what we're seeing with
> the .war file that the TCK uses. I'll take a look at that with a debugger.
>
> Jon
>
> On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho 
> wrote:
>
>> Jon, thank you for helping out with this.
>>
>> I created a sample project with the description of the issue and how to
>> reproduce it.
>>
>> See here: https://github.com/ivanjunckes/openapi_sample
>>
>> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
>> jonathan.gallim...@gmail.com> wrote:
>>
>> > I built master (without this PR), and deployed the .war file that the
>> > openapi-tck creates, which includes this class:
>> >
>> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
>> (.war
>> > file attached - not sure if it'll make it through to the mailing list or
>> > not).
>> >
>> > Here's the full output for a call to /openapi:
>> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
>> >
>> > Note under "info" I get:
>> >
>> > ---
>> > info:
>> >   version: "1.0"
>> >   description: ""
>> >   license:
>> > name: "Apache 2.0"
>> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
>> >   contact:
>> > name: "AirlinesRatingApp API Support"
>> > email: "techsupp...@airlinesratingapp.com"
>> > url: "http://exampleurl.com/contact";
>> >   termsOfService: "http://airlinesratingapp.com/terms";
>> >   title: "AirlinesRatingApp API"
>> > security:
>> > - airlinesRatingApp_auth: []
>> > tags:
>> > - name: "user"
>> >   description: "Operations about user"
>> > ---
>> >
>> > At this point, I'm not sure what the PR fixes. It looks like its working
>> > ok out of the box. I think we need more detail on the actual error. If
>> you
>> > can't include a test in the PR, perhaps you could provide a sample app
>> that
>> > reproduces the problem, along with the expected and actual output on
>> both
>> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
>> >
>> > I did try 8.0.0-M2 with same app from the TCK, which gives a deployment
>> > error and a HTTP 500 error at runtime. Not a great result, but an
>> entirely
>> > different error I think. Full exception below.
>> >
>> > Jon
>> >
>> > 15-May-2019 10:48:24.459 INFO [main]
>> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
>> >
>> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
>> > looking all classes to find CDI beans, maybe think to add a beans.xml if
>> > not there or add the jar to exclusions.list
>> > 15-May-2019 10:48:25.352 INFO [main]
>> > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
>> > injection points were validated successfully.
>> > 15-May-2019 10:48:25.377 INFO [main]
>> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans
>> > Container has started, it took 1114 ms.
>> > 15-May-2019 10:48:25.387 INFO [main]
>> > org.apache.openejb.assembler.classic.Assembler.createApplication
>> Deployed
>> >
>> Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
>> > 15-May-2019 10:48:25.511 INFO [main]
>> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
>> > org.apache.myfaces.ee.MyFacesContainerInitializer
>> > 15-May-2019 10:48:25.530 INFO [main]
>> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
>> > FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
>> > 15-May-2019 10:48:25.542 INFO [main]
>> > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was
>> scanned
>> > for TLDs yet contained no TLDs. Enable debug logging for this logger
>> for a
>> > complete list of JARs that were scanned but no TLDs were found in them.
>> > Skipping unneeded JARs during scanning can improve startup time and JSP
>> > compilation time.
>> > 15-May-2019 10:48:25.547 INFO [main]
>> > org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer.addListener
>> > Installing
>> >
>> org.apache.myfaces.webapp.StartupServletContextListener
>> > 15-May-2019 10:48:25.599 INFO [main]
>> >
>> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig
>> > Reading standard config META-INF/standard-faces-config.xml
>> > 15-May-2019 10:48:25.773 INFO [main]
>> >
>> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
>> > Reading config :
>> >
>> jar:file:/Users/jgallimore/srv/apache-t

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-15 Thread Jonathan Gallimore
Thanks. That helps a lot. Definitely different to what we're seeing with
the .war file that the TCK uses. I'll take a look at that with a debugger.

Jon

On Wed, May 15, 2019 at 1:58 PM Ivan Junckes Filho 
wrote:

> Jon, thank you for helping out with this.
>
> I created a sample project with the description of the issue and how to
> reproduce it.
>
> See here: https://github.com/ivanjunckes/openapi_sample
>
> On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
> jonathan.gallim...@gmail.com> wrote:
>
> > I built master (without this PR), and deployed the .war file that the
> > openapi-tck creates, which includes this class:
> >
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
> (.war
> > file attached - not sure if it'll make it through to the mailing list or
> > not).
> >
> > Here's the full output for a call to /openapi:
> > https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
> >
> > Note under "info" I get:
> >
> > ---
> > info:
> >   version: "1.0"
> >   description: ""
> >   license:
> > name: "Apache 2.0"
> > url: "http://www.apache.org/licenses/LICENSE-2.0.html";
> >   contact:
> > name: "AirlinesRatingApp API Support"
> > email: "techsupp...@airlinesratingapp.com"
> > url: "http://exampleurl.com/contact";
> >   termsOfService: "http://airlinesratingapp.com/terms";
> >   title: "AirlinesRatingApp API"
> > security:
> > - airlinesRatingApp_auth: []
> > tags:
> > - name: "user"
> >   description: "Operations about user"
> > ---
> >
> > At this point, I'm not sure what the PR fixes. It looks like its working
> > ok out of the box. I think we need more detail on the actual error. If
> you
> > can't include a test in the PR, perhaps you could provide a sample app
> that
> > reproduces the problem, along with the expected and actual output on both
> > master and 8.0.0-M2. I'd be happy to help troubleshoot that.
> >
> > I did try 8.0.0-M2 with same app from the TCK, which gives a deployment
> > error and a HTTP 500 error at runtime. Not a great result, but an
> entirely
> > different error I think. Full exception below.
> >
> > Jon
> >
> > 15-May-2019 10:48:24.459 INFO [main]
> > org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
> >
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> > looking all classes to find CDI beans, maybe think to add a beans.xml if
> > not there or add the jar to exclusions.list
> > 15-May-2019 10:48:25.352 INFO [main]
> > org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
> > injection points were validated successfully.
> > 15-May-2019 10:48:25.377 INFO [main]
> > org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans
> > Container has started, it took 1114 ms.
> > 15-May-2019 10:48:25.387 INFO [main]
> > org.apache.openejb.assembler.classic.Assembler.createApplication Deployed
> >
> Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
> > 15-May-2019 10:48:25.511 INFO [main]
> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
> > org.apache.myfaces.ee.MyFacesContainerInitializer
> > 15-May-2019 10:48:25.530 INFO [main]
> > org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
> > FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
> > 15-May-2019 10:48:25.542 INFO [main]
> > org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was
> scanned
> > for TLDs yet contained no TLDs. Enable debug logging for this logger for
> a
> > complete list of JARs that were scanned but no TLDs were found in them.
> > Skipping unneeded JARs during scanning can improve startup time and JSP
> > compilation time.
> > 15-May-2019 10:48:25.547 INFO [main]
> > org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer.addListener
> > Installing
> >
> org.apache.myfaces.webapp.StartupServletContextListener
> > 15-May-2019 10:48:25.599 INFO [main]
> >
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig
> > Reading standard config META-INF/standard-faces-config.xml
> > 15-May-2019 10:48:25.773 INFO [main]
> >
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
> > Reading config :
> >
> jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-jsf-2.0.9.jar!/META-INF/faces-config.xml
> > 15-May-2019 10:48:25.775 INFO [main]
> >
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
> > Reading config :
> >
> jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-el22-2.0.9.jar!/META-INF/faces-config.xml
> > 15-May-2019 10:48:25.860 INFO [main]
> > org.apache.myfaces.config.LogMetaInfUtils.logArtifact Artifact
> > 'myfaces-api' was found in version '2.3.2' from path
> >
> 'file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-15 Thread Ivan Junckes Filho
Jon, thank you for helping out with this.

I created a sample project with the description of the issue and how to
reproduce it.

See here: https://github.com/ivanjunckes/openapi_sample

On Wed, May 15, 2019 at 6:54 AM Jonathan Gallimore <
jonathan.gallim...@gmail.com> wrote:

> I built master (without this PR), and deployed the .war file that the
> openapi-tck creates, which includes this class:
> https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
>  (.war
> file attached - not sure if it'll make it through to the mailing list or
> not).
>
> Here's the full output for a call to /openapi:
> https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6
>
> Note under "info" I get:
>
> ---
> info:
>   version: "1.0"
>   description: ""
>   license:
> name: "Apache 2.0"
> url: "http://www.apache.org/licenses/LICENSE-2.0.html";
>   contact:
> name: "AirlinesRatingApp API Support"
> email: "techsupp...@airlinesratingapp.com"
> url: "http://exampleurl.com/contact";
>   termsOfService: "http://airlinesratingapp.com/terms";
>   title: "AirlinesRatingApp API"
> security:
> - airlinesRatingApp_auth: []
> tags:
> - name: "user"
>   description: "Operations about user"
> ---
>
> At this point, I'm not sure what the PR fixes. It looks like its working
> ok out of the box. I think we need more detail on the actual error. If you
> can't include a test in the PR, perhaps you could provide a sample app that
> reproduces the problem, along with the expected and actual output on both
> master and 8.0.0-M2. I'd be happy to help troubleshoot that.
>
> I did try 8.0.0-M2 with same app from the TCK, which gives a deployment
> error and a HTTP 500 error at runtime. Not a great result, but an entirely
> different error I think. Full exception below.
>
> Jon
>
> 15-May-2019 10:48:24.459 INFO [main]
> org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
> file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
> looking all classes to find CDI beans, maybe think to add a beans.xml if
> not there or add the jar to exclusions.list
> 15-May-2019 10:48:25.352 INFO [main]
> org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
> injection points were validated successfully.
> 15-May-2019 10:48:25.377 INFO [main]
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans
> Container has started, it took 1114 ms.
> 15-May-2019 10:48:25.387 INFO [main]
> org.apache.openejb.assembler.classic.Assembler.createApplication Deployed
> Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
> 15-May-2019 10:48:25.511 INFO [main]
> org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
> org.apache.myfaces.ee.MyFacesContainerInitializer
> 15-May-2019 10:48:25.530 INFO [main]
> org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
> FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
> 15-May-2019 10:48:25.542 INFO [main]
> org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
> for TLDs yet contained no TLDs. Enable debug logging for this logger for a
> complete list of JARs that were scanned but no TLDs were found in them.
> Skipping unneeded JARs during scanning can improve startup time and JSP
> compilation time.
> 15-May-2019 10:48:25.547 INFO [main]
> org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer.addListener
> Installing
> org.apache.myfaces.webapp.StartupServletContextListener
> 15-May-2019 10:48:25.599 INFO [main]
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig
> Reading standard config META-INF/standard-faces-config.xml
> 15-May-2019 10:48:25.773 INFO [main]
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
> Reading config :
> jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-jsf-2.0.9.jar!/META-INF/faces-config.xml
> 15-May-2019 10:48:25.775 INFO [main]
> org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
> Reading config :
> jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-el22-2.0.9.jar!/META-INF/faces-config.xml
> 15-May-2019 10:48:25.860 INFO [main]
> org.apache.myfaces.config.LogMetaInfUtils.logArtifact Artifact
> 'myfaces-api' was found in version '2.3.2' from path
> 'file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/myfaces-api-2.3.2.jar'
> 15-May-2019 10:48:25.860 INFO [main]
> org.apache.myfaces.config.LogMetaInfUtils.logArtifact Artifact
> 'myfaces-impl' was found in version '2.3.2' from path
> 'file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/myfaces-impl-2.3.2.jar'
> 15-May-2019 10:48:25.868 INFO [main]
> org.apache.myfaces.util.ExternalSpecifications.isCDIAvailable MyFaces CDI
> support enabled
> 15-May-2019 10:4

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-15 Thread Jonathan Gallimore
I built master (without this PR), and deployed the .war file that the
openapi-tck creates, which includes this class:
https://github.com/eclipse/microprofile-open-api/blob/master/tck/src/main/java/org/eclipse/microprofile/openapi/apps/airlines/JAXRSApp.java
(.war
file attached - not sure if it'll make it through to the mailing list or
not).

Here's the full output for a call to /openapi:
https://gist.github.com/jgallimore/f04ea487b326bc525a950fec5bd938c6

Note under "info" I get:

---
info:
  version: "1.0"
  description: ""
  license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html";
  contact:
name: "AirlinesRatingApp API Support"
email: "techsupp...@airlinesratingapp.com"
url: "http://exampleurl.com/contact";
  termsOfService: "http://airlinesratingapp.com/terms";
  title: "AirlinesRatingApp API"
security:
- airlinesRatingApp_auth: []
tags:
- name: "user"
  description: "Operations about user"
---

At this point, I'm not sure what the PR fixes. It looks like its working ok
out of the box. I think we need more detail on the actual error. If you
can't include a test in the PR, perhaps you could provide a sample app that
reproduces the problem, along with the expected and actual output on both
master and 8.0.0-M2. I'd be happy to help troubleshoot that.

I did try 8.0.0-M2 with same app from the TCK, which gives a deployment
error and a HTTP 500 error at runtime. Not a great result, but an entirely
different error I think. Full exception below.

Jon

15-May-2019 10:48:24.459 INFO [main]
org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for
file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/microprofile-rest-client-api-1.1.jar
looking all classes to find CDI beans, maybe think to add a beans.xml if
not there or add the jar to exclusions.list
15-May-2019 10:48:25.352 INFO [main]
org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All
injection points were validated successfully.
15-May-2019 10:48:25.377 INFO [main]
org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans
Container has started, it took 1114 ms.
15-May-2019 10:48:25.387 INFO [main]
org.apache.openejb.assembler.classic.Assembler.createApplication Deployed
Application(path=/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/webapps/test)
15-May-2019 10:48:25.511 INFO [main]
org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Using
org.apache.myfaces.ee.MyFacesContainerInitializer
15-May-2019 10:48:25.530 INFO [main]
org.apache.myfaces.ee.MyFacesContainerInitializer.onStartup Added
FacesServlet with mappings=[/faces/*, *.jsf, *.faces, *.xhtml]
15-May-2019 10:48:25.542 INFO [main]
org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned
for TLDs yet contained no TLDs. Enable debug logging for this logger for a
complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP
compilation time.
15-May-2019 10:48:25.547 INFO [main]
org.apache.tomee.myfaces.TomEEMyFacesContainerInitializer.addListener
Installing
org.apache.myfaces.webapp.StartupServletContextListener
15-May-2019 10:48:25.599 INFO [main]
org.apache.myfaces.config.DefaultFacesConfigurationProvider.getStandardFacesConfig
Reading standard config META-INF/standard-faces-config.xml
15-May-2019 10:48:25.773 INFO [main]
org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
Reading config :
jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-jsf-2.0.9.jar!/META-INF/faces-config.xml
15-May-2019 10:48:25.775 INFO [main]
org.apache.myfaces.config.DefaultFacesConfigurationProvider.getClassloaderFacesConfig
Reading config :
jar:file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/openwebbeans-el22-2.0.9.jar!/META-INF/faces-config.xml
15-May-2019 10:48:25.860 INFO [main]
org.apache.myfaces.config.LogMetaInfUtils.logArtifact Artifact
'myfaces-api' was found in version '2.3.2' from path
'file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/myfaces-api-2.3.2.jar'
15-May-2019 10:48:25.860 INFO [main]
org.apache.myfaces.config.LogMetaInfUtils.logArtifact Artifact
'myfaces-impl' was found in version '2.3.2' from path
'file:/Users/jgallimore/srv/apache-tomee-microprofile-8.0.0-M2/lib/myfaces-impl-2.3.2.jar'
15-May-2019 10:48:25.868 INFO [main]
org.apache.myfaces.util.ExternalSpecifications.isCDIAvailable MyFaces CDI
support enabled
15-May-2019 10:48:25.869 INFO [main]
org.apache.myfaces.spi.impl.DefaultInjectionProviderFactory.getInjectionProvider
Using InjectionProvider
org.apache.myfaces.spi.impl.CDIAnnotationDelegateInjectionProvider
15-May-2019 10:48:25.909 INFO [main]
org.apache.myfaces.util.ExternalSpecifications.isBeanValidationAvailable
MyFaces Bean Validation support enabled
15-May-2019 10:48:25.946 INFO [main]
org.apache.myfaces.application.ApplicationImpl.getProjectStage Couldn't
discover the c

Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread David Blevins
> On May 15, 2019, at 2:55 AM, Ivan Junckes Filho  wrote:
> 
> Adding openejb.cxf-rs.cache-application=false to system.properties in M2
> doesn't fix the issue.

That's refreshing and not surprising.  I'm not a fan of these kinds of system 
properties.  The theme of them is often that we couldn't figure out how to 
properly implement something and cover all the cases, so we give up and kick 
the complexity to the user who will have even less chance to understand the 
tradeoffs.

They're basically road signs that say, "technical debt ahead, proceed at your 
own risk."

I would really love to do a mass removal of these kinds of properties.


-David




Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread Jonathan Gallimore
I'll see if I can help you add a test so we have a better understanding of
what's going on, and help get this PR over the line.

Jon

On Tue, 14 May 2019, 18:56 Ivan Junckes Filho, 
wrote:

> David, I will try to create a good description of the problem tomorrow
> morning.
>
> Adding openejb.cxf-rs.cache-application=false to system.properties in M2
> doesn't fix the issue.
>
>
>
> On Tue, May 14, 2019 at 1:37 PM Roberto Cortez  >
> wrote:
>
> > It is. We added it here:
> >
> >
> >
> https://github.com/apache/tomee/blob/a21d73afca6d7842333a5fb0e0c1a3eff653f983/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java#L93
> > <
> >
> https://github.com/apache/tomee/blob/a21d73afca6d7842333a5fb0e0c1a3eff653f983/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java#L93
> > >
> >
> > I believe this was only added on that big PR with all the MP integrations
> > for M3, but it was not present on M2.
> >
> > Cheers,
> > Roberto
> >
> > > On 14 May 2019, at 17:01, David Blevins 
> wrote:
> > >
> > >> On May 15, 2019, at 12:55 AM, David Blevins 
> > wrote:
> > >>
> > >> Side note to everyone on TCKs and system properties: we have to pass
> > TCKs with the default settings we ship.  If we have to disable/enable
> > features to pass a TCK, we haven't passed the TCK.
> > >
> > > On this topic:
> > >
> > > - what is the flag we enabled to pass the OpenAPI TCK?
> > > - why couldn't we ship that setting on/off by default?
> > >
> > > We can ship milestones like this, but we'll definitely need to ship
> with
> > compliant defaults for our final.
> > >
> > >
> > > -David
> > >
> > >
> > >
> >
> >
>


Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread Ivan Junckes Filho
David, I will try to create a good description of the problem tomorrow
morning.

Adding openejb.cxf-rs.cache-application=false to system.properties in M2
doesn't fix the issue.



On Tue, May 14, 2019 at 1:37 PM Roberto Cortez 
wrote:

> It is. We added it here:
>
>
> https://github.com/apache/tomee/blob/a21d73afca6d7842333a5fb0e0c1a3eff653f983/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java#L93
> <
> https://github.com/apache/tomee/blob/a21d73afca6d7842333a5fb0e0c1a3eff653f983/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java#L93
> >
>
> I believe this was only added on that big PR with all the MP integrations
> for M3, but it was not present on M2.
>
> Cheers,
> Roberto
>
> > On 14 May 2019, at 17:01, David Blevins  wrote:
> >
> >> On May 15, 2019, at 12:55 AM, David Blevins 
> wrote:
> >>
> >> Side note to everyone on TCKs and system properties: we have to pass
> TCKs with the default settings we ship.  If we have to disable/enable
> features to pass a TCK, we haven't passed the TCK.
> >
> > On this topic:
> >
> > - what is the flag we enabled to pass the OpenAPI TCK?
> > - why couldn't we ship that setting on/off by default?
> >
> > We can ship milestones like this, but we'll definitely need to ship with
> compliant defaults for our final.
> >
> >
> > -David
> >
> >
> >
>
>


Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread Roberto Cortez
It is. We added it here:

https://github.com/apache/tomee/blob/a21d73afca6d7842333a5fb0e0c1a3eff653f983/tomee/tomee-microprofile/mp-common/src/main/java/org/apache/tomee/microprofile/TomEEMicroProfileListener.java#L93
 


I believe this was only added on that big PR with all the MP integrations for 
M3, but it was not present on M2. 

Cheers,
Roberto

> On 14 May 2019, at 17:01, David Blevins  wrote:
> 
>> On May 15, 2019, at 12:55 AM, David Blevins  wrote:
>> 
>> Side note to everyone on TCKs and system properties: we have to pass TCKs 
>> with the default settings we ship.  If we have to disable/enable features to 
>> pass a TCK, we haven't passed the TCK.
> 
> On this topic:
> 
> - what is the flag we enabled to pass the OpenAPI TCK?
> - why couldn't we ship that setting on/off by default?
> 
> We can ship milestones like this, but we'll definitely need to ship with 
> compliant defaults for our final.
> 
> 
> -David
> 
> 
> 



Re: @OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread David Blevins
> On May 15, 2019, at 12:55 AM, David Blevins  wrote:
> 
> Side note to everyone on TCKs and system properties: we have to pass TCKs 
> with the default settings we ship.  If we have to disable/enable features to 
> pass a TCK, we haven't passed the TCK.

On this topic:

 - what is the flag we enabled to pass the OpenAPI TCK?
 - why couldn't we ship that setting on/off by default?

We can ship milestones like this, but we'll definitely need to ship with 
compliant defaults for our final.


-David





@OpenAPIDefinition not working (was Re: TomEE Important PR pending - Merge please?)

2019-05-14 Thread David Blevins
Hey all,

I will happily donate my time to do another milestone next week if we can focus 
on doing the right thing now.

I see three forms of technical debt in this exchange:

 - No tests
 - The only real description is a long email thread
 - An undocumented property no one understands

Side note to everyone on TCKs and system properties: we have to pass TCKs with 
the default settings we ship.  If we have to disable/enable features to pass a 
TCK, we haven't passed the TCK.

I've read the PR, JIRA and thread and there isn't enough information there for 
anyone to help create a test case.  The input is clear, but the expected output 
is not.  Something as simple as "I want this [code snippet], but I'm getting 
this [code snippet]" would go a long way.

There are a bunch of excited people looking for something to hack on that might 
be able to help with finishing the PR.  I'm sure someone would be willing to 
step up and help get this finished and merged.


-- 
David Blevins
http://twitter.com/dblevins
http://www.tomitribe.com

> On May 14, 2019, at 11:38 PM, Ivan Junckes Filho  
> wrote:
> 
> Removing that flag doesn't fix the problem unfortunately. I saw your
> comment Jon, but the issue is not with Geronimo as far as I understand.
> TomEE uses InternalApplication instead of using the custom Application
> config and because of that geronimo doesn't pick it up in the geronimo
> extension.
> 
> I added the apache header Jean-Louis. I think Otavio asked for help to
> write a test, but nobody replied.
> 
> Basically openapiextension ignores @OpenAPIDefinition and the result is
> that none of those values are added to the final openapi document.
> 
> On Tue, May 14, 2019 at 10:26 AM Jean-Louis Monteiro <
> jlmonte...@tomitribe.com> wrote:
> 
>> Agreed.
>> 
>> Le mar. 14 mai 2019 à 15:24, Jonathan Gallimore <
>> jonathan.gallim...@gmail.com> a écrit :
>> 
>>> I added a note on the PR. I did find the discussion on the mailing list:
>>> 
>>> 
>> http://tomee-openejb.979440.n4.nabble.com/OpenAPIDefinition-not-working-td4687918.html
>>> .
>>> 
>>> It sounded like a flag is needed to pass the TCK currently - preference
>>> would be that there is a test for this issue (which could just be an
>>> Arquillian test which reads from /openapi, right?), but at the very
>> least,
>>> some indication that this is covered by the TCK and the removal of
>>> the openejb.cxf-rs.cache-application=false setting in the existing TCK
>>> module.
>>> 
>>> Jon
>>> 
>>> 
>>> On Tue, May 14, 2019 at 1:29 PM Ivan Junckes Filho <
>> ivanjunc...@gmail.com>
>>> wrote:
>>> 
>>>> Hey guys, this PR from Otavio fixes a very bad issue with OpenAPI in
>>> TomEE
>>>> regarding the use of InternalApplication.
>>>> 
>>>> https://issues.apache.org/jira/browse/TOMEE-2502
>>>> 
>>>> I reviewed the PR and it really fixes the issue.
>>>> 
>>>> Can someone please merge this? This is pending for awhile and I would
>>>> appreciate a lot to have this fix in.
>>>> 
>>>> https://github.com/apache/tomee/pull/454
>>>> 
>>> 
>> 



Re: @OpenAPIDefinition not working

2019-04-01 Thread Otávio Gonçalves de Santana
Hey, I could fix and I created a PR:

https://github.com/apache/tomee/pull/454

Could someone help me on how to create a test on this?
Thank you.

On Mon, Apr 1, 2019 at 1:01 PM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

>
> I tried a workaround to ignore at CdiScanner, however, even if this code
> is still loading the class.
>
> if(!clazz.getName().equals("org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension"))
>  {
> classes.add(clazz);
> }
>
>
> However, that still send the information to OpenWebBeans. My next step is
> to try at the *OpenEJBLifecycle*.
>
> On Fri, Mar 29, 2019 at 5:45 PM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>>
>>
>> I created the TomEEOpenAPIExtension that wrapper the
>> GeronimoOpenAPIExtension.
>>
>> My question is, how can I shut down the GeronimoOpenAPIExtension
>> extension?
>>
>> I tried to append this value at system.properties:
>>
>> openejb.classloader.forced-skip=org.apache.geronimo.microprofile.openapi.cdi
>> But it does not work.
>>
>> I need to ignore the GeronimoOpenAPIExtension, to avoid the duplicated
>> creation of Bean at CDI.
>>
>>
>>
>> On Fri, Mar 29, 2019 at 9:52 AM Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> wrote:
>>
>>> Unfortunately, this approach does not work.
>>>
>>>
>>> ProxyFactory proxyFactory = new ProxyFactory();
>>> proxyFactory.setSuperclass(Application.class);
>>> proxyFactory.setFilter(new MethodFilter() {
>>> public boolean isHandled(Method m) {
>>> return !m.getName().equals("finalize");
>>> }
>>> });
>>> Class aClass = proxyFactory.createClass();
>>>
>>> MethodHandler mi = new MethodHandler() {
>>> public Object invoke(Object self, Method m, Method proceed,
>>>  Object[] args) throws Throwable {
>>> //wrap the getClass()
>>> return proceed.invoke(self, args);
>>> }
>>> };
>>> Application foo = (Application)aClass.newInstance();
>>> ((ProxyObject)foo).setHandler(mi);
>>> Class aClass1 = foo.getClass();
>>>
>>>
>>> I'll try another strategy.
>>>
>>>
>>> On Thu, Mar 28, 2019 at 2:39 PM Otávio Gonçalves de Santana <
>>> osant...@tomitribe.com> wrote:
>>>
 One possible solution is the Javassist .
 Therefore, I can create a proxy on a class.

 ProxyFactory factory = new ProxyFactory();
 factory.setSuperclass(Application.class);
 factory.setFilter(
 new MethodFilter() {
 @Override
 public boolean isHandled(Method method) {
 return true;
 }
 }
 );

 MethodHandler handler = new MethodHandler() {
 @Override
 public Object invoke(Object self, Method thisMethod, Method proceed, 
 Object[] args) throws Throwable {
   //the logic here
 }
 };

 Application application = (Application) factory.create(new Class[0], 
 new Object[0], handler);


 That is possible, but it does not look good. I'll try another option.
 Also, we need to include this library on the Server.

 Thoughts?

 On Thu, Mar 28, 2019 at 10:45 AM Otávio Gonçalves de Santana <
 osant...@tomitribe.com> wrote:

> The InternalApplication is required, because, at RESTService it needs
> to add classes as a wrapper.
> My first thought is to create a proxy, however, Application is a class
> and not an interface.
>
> On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>> Yes, there is this line that does not do this verification:
>>
>>  application = !InternalApplication.class.isInstance(application) ? new 
>> InternalApplication(application) : application;
>>
>>
>>
>> https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224
>>
>> On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
>> wrote:
>>
>>> It is not injecting the config values for
>>> org.microprofileext.openapi.swaggerui.Templates and yes,
>>> using openejb.cxf-rs.cache-application=false the issue still
>>> happening.
>>> Interesting..
>>>
>>> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
>>> osant...@tomitribe.com> escreveu:
>>>
>>> > My maven configuration:
>>> >
>>> > http://maven.apache.org/POM/4.0.0";
>>> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>> > 4.0.0
>>> >
>>> > org.superbiz
>>> > env-tomee
>>> > war
>>> >
>>> > OpenEJB
>>> > OpenEJB :: Web Examples
>>> > 0.0.1-SNAPSHOT
>>> > http://tomee.apache.org
>>> >
>>> > 
>>> >
>>>  UTF-8
>>> > 8.0.0-M2
>>> > 
>

Re: @OpenAPIDefinition not working

2019-04-01 Thread Otávio Gonçalves de Santana
I tried a workaround to ignore at CdiScanner, however, even if this code is
still loading the class.

if(!clazz.getName().equals("org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension"))
{
classes.add(clazz);
}


However, that still send the information to OpenWebBeans. My next step is
to try at the *OpenEJBLifecycle*.

On Fri, Mar 29, 2019 at 5:45 PM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

>
>
> I created the TomEEOpenAPIExtension that wrapper the
> GeronimoOpenAPIExtension.
>
> My question is, how can I shut down the GeronimoOpenAPIExtension
> extension?
>
> I tried to append this value at system.properties:
>
> openejb.classloader.forced-skip=org.apache.geronimo.microprofile.openapi.cdi
> But it does not work.
>
> I need to ignore the GeronimoOpenAPIExtension, to avoid the duplicated
> creation of Bean at CDI.
>
>
>
> On Fri, Mar 29, 2019 at 9:52 AM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>> Unfortunately, this approach does not work.
>>
>>
>> ProxyFactory proxyFactory = new ProxyFactory();
>> proxyFactory.setSuperclass(Application.class);
>> proxyFactory.setFilter(new MethodFilter() {
>> public boolean isHandled(Method m) {
>> return !m.getName().equals("finalize");
>> }
>> });
>> Class aClass = proxyFactory.createClass();
>>
>> MethodHandler mi = new MethodHandler() {
>> public Object invoke(Object self, Method m, Method proceed,
>>  Object[] args) throws Throwable {
>> //wrap the getClass()
>> return proceed.invoke(self, args);
>> }
>> };
>> Application foo = (Application)aClass.newInstance();
>> ((ProxyObject)foo).setHandler(mi);
>> Class aClass1 = foo.getClass();
>>
>>
>> I'll try another strategy.
>>
>>
>> On Thu, Mar 28, 2019 at 2:39 PM Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> wrote:
>>
>>> One possible solution is the Javassist .
>>> Therefore, I can create a proxy on a class.
>>>
>>> ProxyFactory factory = new ProxyFactory();
>>> factory.setSuperclass(Application.class);
>>> factory.setFilter(
>>> new MethodFilter() {
>>> @Override
>>> public boolean isHandled(Method method) {
>>> return true;
>>> }
>>> }
>>> );
>>>
>>> MethodHandler handler = new MethodHandler() {
>>> @Override
>>> public Object invoke(Object self, Method thisMethod, Method proceed, 
>>> Object[] args) throws Throwable {
>>>   //the logic here
>>> }
>>> };
>>>
>>> Application application = (Application) factory.create(new Class[0], new 
>>> Object[0], handler);
>>>
>>>
>>> That is possible, but it does not look good. I'll try another option.
>>> Also, we need to include this library on the Server.
>>>
>>> Thoughts?
>>>
>>> On Thu, Mar 28, 2019 at 10:45 AM Otávio Gonçalves de Santana <
>>> osant...@tomitribe.com> wrote:
>>>
 The InternalApplication is required, because, at RESTService it needs
 to add classes as a wrapper.
 My first thought is to create a proxy, however, Application is a class
 and not an interface.

 On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
 osant...@tomitribe.com> wrote:

> Yes, there is this line that does not do this verification:
>
>  application = !InternalApplication.class.isInstance(application) ? new 
> InternalApplication(application) : application;
>
>
>
> https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224
>
> On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
> wrote:
>
>> It is not injecting the config values for
>> org.microprofileext.openapi.swaggerui.Templates and yes,
>> using openejb.cxf-rs.cache-application=false the issue still
>> happening.
>> Interesting..
>>
>> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> escreveu:
>>
>> > My maven configuration:
>> >
>> > http://maven.apache.org/POM/4.0.0";
>> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>> > 4.0.0
>> >
>> > org.superbiz
>> > env-tomee
>> > war
>> >
>> > OpenEJB
>> > OpenEJB :: Web Examples
>> > 0.0.1-SNAPSHOT
>> > http://tomee.apache.org
>> >
>> > 
>> >
>>  UTF-8
>> > 8.0.0-M2
>> > 
>> >
>> > 
>> > env-tomee
>> > 
>> > 
>> > org.apache.maven.plugins
>> > maven-compiler-plugin
>> > 3.5.1
>> > 
>> > 1.8
>> > 1.8
>> > 
>> > 
>> > 
>> > 

Re: @OpenAPIDefinition not working

2019-03-29 Thread Otávio Gonçalves de Santana
I created the TomEEOpenAPIExtension that wrapper the
GeronimoOpenAPIExtension.

My question is, how can I shut down the GeronimoOpenAPIExtension extension?

I tried to append this value at system.properties:
openejb.classloader.forced-skip=org.apache.geronimo.microprofile.openapi.cdi
But it does not work.

I need to ignore the GeronimoOpenAPIExtension, to avoid the duplicated
creation of Bean at CDI.



On Fri, Mar 29, 2019 at 9:52 AM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

> Unfortunately, this approach does not work.
>
>
> ProxyFactory proxyFactory = new ProxyFactory();
> proxyFactory.setSuperclass(Application.class);
> proxyFactory.setFilter(new MethodFilter() {
> public boolean isHandled(Method m) {
> return !m.getName().equals("finalize");
> }
> });
> Class aClass = proxyFactory.createClass();
>
> MethodHandler mi = new MethodHandler() {
> public Object invoke(Object self, Method m, Method proceed,
>  Object[] args) throws Throwable {
> //wrap the getClass()
> return proceed.invoke(self, args);
> }
> };
> Application foo = (Application)aClass.newInstance();
> ((ProxyObject)foo).setHandler(mi);
> Class aClass1 = foo.getClass();
>
>
> I'll try another strategy.
>
>
> On Thu, Mar 28, 2019 at 2:39 PM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>> One possible solution is the Javassist .
>> Therefore, I can create a proxy on a class.
>>
>> ProxyFactory factory = new ProxyFactory();
>> factory.setSuperclass(Application.class);
>> factory.setFilter(
>> new MethodFilter() {
>> @Override
>> public boolean isHandled(Method method) {
>> return true;
>> }
>> }
>> );
>>
>> MethodHandler handler = new MethodHandler() {
>> @Override
>> public Object invoke(Object self, Method thisMethod, Method proceed, 
>> Object[] args) throws Throwable {
>>   //the logic here
>> }
>> };
>>
>> Application application = (Application) factory.create(new Class[0], new 
>> Object[0], handler);
>>
>>
>> That is possible, but it does not look good. I'll try another option.
>> Also, we need to include this library on the Server.
>>
>> Thoughts?
>>
>> On Thu, Mar 28, 2019 at 10:45 AM Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> wrote:
>>
>>> The InternalApplication is required, because, at RESTService it needs to
>>> add classes as a wrapper.
>>> My first thought is to create a proxy, however, Application is a class
>>> and not an interface.
>>>
>>> On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
>>> osant...@tomitribe.com> wrote:
>>>
 Yes, there is this line that does not do this verification:

  application = !InternalApplication.class.isInstance(application) ? new 
 InternalApplication(application) : application;



 https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224

 On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
 wrote:

> It is not injecting the config values for
> org.microprofileext.openapi.swaggerui.Templates and yes,
> using openejb.cxf-rs.cache-application=false the issue still happening.
> Interesting..
>
> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
> osant...@tomitribe.com> escreveu:
>
> > My maven configuration:
> >
> > http://maven.apache.org/POM/4.0.0";
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> > 4.0.0
> >
> > org.superbiz
> > env-tomee
> > war
> >
> > OpenEJB
> > OpenEJB :: Web Examples
> > 0.0.1-SNAPSHOT
> > http://tomee.apache.org
> >
> > 
> >
>  UTF-8
> > 8.0.0-M2
> > 
> >
> > 
> > env-tomee
> > 
> > 
> > org.apache.maven.plugins
> > maven-compiler-plugin
> > 3.5.1
> > 
> > 1.8
> > 1.8
> > 
> > 
> > 
> > org.apache.maven.plugins
> > maven-war-plugin
> > 3.1.0
> > 
> > 
> > 
> >
> > 
> > 
> > apache-m2-snapshot
> > Apache Snapshot Repository
> > 
> https://repository.apache.org/content/groups/snapshots
> > 
> > 
> > true
> > 
> > 
> > 
> >
> > 
> > 
> > apache.snapshots
> > http://repository.apache.org/snapshots/
> >  

Re: @OpenAPIDefinition not working

2019-03-29 Thread Otávio Gonçalves de Santana
Unfortunately, this approach does not work.


ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setSuperclass(Application.class);
proxyFactory.setFilter(new MethodFilter() {
public boolean isHandled(Method m) {
return !m.getName().equals("finalize");
}
});
Class aClass = proxyFactory.createClass();

MethodHandler mi = new MethodHandler() {
public Object invoke(Object self, Method m, Method proceed,
 Object[] args) throws Throwable {
//wrap the getClass()
return proceed.invoke(self, args);
}
};
Application foo = (Application)aClass.newInstance();
((ProxyObject)foo).setHandler(mi);
Class aClass1 = foo.getClass();


I'll try another strategy.


On Thu, Mar 28, 2019 at 2:39 PM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

> One possible solution is the Javassist .
> Therefore, I can create a proxy on a class.
>
> ProxyFactory factory = new ProxyFactory();
> factory.setSuperclass(Application.class);
> factory.setFilter(
> new MethodFilter() {
> @Override
> public boolean isHandled(Method method) {
> return true;
> }
> }
> );
>
> MethodHandler handler = new MethodHandler() {
> @Override
> public Object invoke(Object self, Method thisMethod, Method proceed, 
> Object[] args) throws Throwable {
>   //the logic here
> }
> };
>
> Application application = (Application) factory.create(new Class[0], new 
> Object[0], handler);
>
>
> That is possible, but it does not look good. I'll try another option.
> Also, we need to include this library on the Server.
>
> Thoughts?
>
> On Thu, Mar 28, 2019 at 10:45 AM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>> The InternalApplication is required, because, at RESTService it needs to
>> add classes as a wrapper.
>> My first thought is to create a proxy, however, Application is a class
>> and not an interface.
>>
>> On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> wrote:
>>
>>> Yes, there is this line that does not do this verification:
>>>
>>>  application = !InternalApplication.class.isInstance(application) ? new 
>>> InternalApplication(application) : application;
>>>
>>>
>>>
>>> https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224
>>>
>>> On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
>>> wrote:
>>>
 It is not injecting the config values for
 org.microprofileext.openapi.swaggerui.Templates and yes,
 using openejb.cxf-rs.cache-application=false the issue still happening.
 Interesting..

 Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
 osant...@tomitribe.com> escreveu:

 > My maven configuration:
 >
 > http://maven.apache.org/POM/4.0.0";
 >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
 > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
 > 4.0.0
 >
 > org.superbiz
 > env-tomee
 > war
 >
 > OpenEJB
 > OpenEJB :: Web Examples
 > 0.0.1-SNAPSHOT
 > http://tomee.apache.org
 >
 > 
 >
  UTF-8
 > 8.0.0-M2
 > 
 >
 > 
 > env-tomee
 > 
 > 
 > org.apache.maven.plugins
 > maven-compiler-plugin
 > 3.5.1
 > 
 > 1.8
 > 1.8
 > 
 > 
 > 
 > org.apache.maven.plugins
 > maven-war-plugin
 > 3.1.0
 > 
 > 
 > 
 >
 > 
 > 
 > apache-m2-snapshot
 > Apache Snapshot Repository
 > 
 https://repository.apache.org/content/groups/snapshots
 > 
 > 
 > true
 > 
 > 
 > 
 >
 > 
 > 
 > apache.snapshots
 > http://repository.apache.org/snapshots/
 > 
 > 
 >
 > 
 > 
 > org.apache.tomee
 > javaee-api
 > 8.0
 > provided
 > 
 > 
 > org.eclipse.microprofile.openapi
 > microprofile-openapi-api
 > 1.1.2
 > provided
 > 
 > 
 > org.microprofile-ext.openapi-ext
 > swagger-ui
 > 1.0.1
 > 
 > 
 > 
 >
 >
 > My code:
 >
 > @ApplicationPath("api")@OpenAPIDefinition(info = @Info(
 > title = "Example application",
>>

Re: @OpenAPIDefinition not working

2019-03-28 Thread Otávio Gonçalves de Santana
One possible solution is the Javassist .
Therefore, I can create a proxy on a class.

ProxyFactory factory = new ProxyFactory();
factory.setSuperclass(Application.class);
factory.setFilter(
new MethodFilter() {
@Override
public boolean isHandled(Method method) {
return true;
}
}
);

MethodHandler handler = new MethodHandler() {
@Override
public Object invoke(Object self, Method thisMethod, Method
proceed, Object[] args) throws Throwable {
  //the logic here
}
};

Application application = (Application) factory.create(new
Class[0], new Object[0], handler);


That is possible, but it does not look good. I'll try another option. Also,
we need to include this library on the Server.

Thoughts?

On Thu, Mar 28, 2019 at 10:45 AM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

> The InternalApplication is required, because, at RESTService it needs to
> add classes as a wrapper.
> My first thought is to create a proxy, however, Application is a class and
> not an interface.
>
> On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
>> Yes, there is this line that does not do this verification:
>>
>>  application = !InternalApplication.class.isInstance(application) ? new 
>> InternalApplication(application) : application;
>>
>>
>>
>> https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224
>>
>> On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
>> wrote:
>>
>>> It is not injecting the config values for
>>> org.microprofileext.openapi.swaggerui.Templates and yes,
>>> using openejb.cxf-rs.cache-application=false the issue still happening.
>>> Interesting..
>>>
>>> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
>>> osant...@tomitribe.com> escreveu:
>>>
>>> > My maven configuration:
>>> >
>>> > http://maven.apache.org/POM/4.0.0";
>>> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>>> > 4.0.0
>>> >
>>> > org.superbiz
>>> > env-tomee
>>> > war
>>> >
>>> > OpenEJB
>>> > OpenEJB :: Web Examples
>>> > 0.0.1-SNAPSHOT
>>> > http://tomee.apache.org
>>> >
>>> > 
>>> >
>>>  UTF-8
>>> > 8.0.0-M2
>>> > 
>>> >
>>> > 
>>> > env-tomee
>>> > 
>>> > 
>>> > org.apache.maven.plugins
>>> > maven-compiler-plugin
>>> > 3.5.1
>>> > 
>>> > 1.8
>>> > 1.8
>>> > 
>>> > 
>>> > 
>>> > org.apache.maven.plugins
>>> > maven-war-plugin
>>> > 3.1.0
>>> > 
>>> > 
>>> > 
>>> >
>>> > 
>>> > 
>>> > apache-m2-snapshot
>>> > Apache Snapshot Repository
>>> > 
>>> https://repository.apache.org/content/groups/snapshots
>>> > 
>>> > 
>>> > true
>>> > 
>>> > 
>>> > 
>>> >
>>> > 
>>> > 
>>> > apache.snapshots
>>> > http://repository.apache.org/snapshots/
>>> > 
>>> > 
>>> >
>>> > 
>>> > 
>>> > org.apache.tomee
>>> > javaee-api
>>> > 8.0
>>> > provided
>>> > 
>>> > 
>>> > org.eclipse.microprofile.openapi
>>> > microprofile-openapi-api
>>> > 1.1.2
>>> > provided
>>> > 
>>> > 
>>> > org.microprofile-ext.openapi-ext
>>> > swagger-ui
>>> > 1.0.1
>>> > 
>>> > 
>>> > 
>>> >
>>> >
>>> > My code:
>>> >
>>> > @ApplicationPath("api")@OpenAPIDefinition(info = @Info(
>>> > title = "Example application",
>>> > version = "1.0.0",
>>> > contact = @Contact(
>>> > name = "Otavio",
>>> > email = "ota...@otavio.com",
>>> > url = "http://www.otaviojava.com.br";)
>>> > ),
>>> > servers = {
>>> > @Server(url = "/example", description = "localhost")
>>> > }
>>> > )public class MVCApplication extends Application {
>>> > }
>>> >
>>> >
>>> @Path("envs")@Produces(MediaType.APPLICATION_JSON)@Consumes(MediaType.APPLICATION_JSON)@Tag(name
>>> > = "Config Retrieval service", description = "Get the value for a
>>> > certain config")public class EnvironmentResource {
>>> >
>>> > @GET
>>> > @Operation(description = "Get the envs")
>>> > @APIResponses({
>>> > @APIResponse(responseCode = "200", description =
>>> > "Successful, returning the value")
>>> > })
>>> > public Map getEnvs() {
>>> > return System.getenv();
>>> > }
>>> >
>>> > @GET
>>> > @Path("/{key}")
>

Re: @OpenAPIDefinition not working

2019-03-28 Thread Otávio Gonçalves de Santana
The InternalApplication is required, because, at RESTService it needs to
add classes as a wrapper.
My first thought is to create a proxy, however, Application is a class and
not an interface.

On Thu, Mar 28, 2019 at 9:43 AM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

> Yes, there is this line that does not do this verification:
>
>  application = !InternalApplication.class.isInstance(application) ? new 
> InternalApplication(application) : application;
>
>
>
> https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224
>
> On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha 
> wrote:
>
>> It is not injecting the config values for
>> org.microprofileext.openapi.swaggerui.Templates and yes,
>> using openejb.cxf-rs.cache-application=false the issue still happening.
>> Interesting..
>>
>> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
>> osant...@tomitribe.com> escreveu:
>>
>> > My maven configuration:
>> >
>> > http://maven.apache.org/POM/4.0.0";
>> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
>> > 4.0.0
>> >
>> > org.superbiz
>> > env-tomee
>> > war
>> >
>> > OpenEJB
>> > OpenEJB :: Web Examples
>> > 0.0.1-SNAPSHOT
>> > http://tomee.apache.org
>> >
>> > 
>> >
>>  UTF-8
>> > 8.0.0-M2
>> > 
>> >
>> > 
>> > env-tomee
>> > 
>> > 
>> > org.apache.maven.plugins
>> > maven-compiler-plugin
>> > 3.5.1
>> > 
>> > 1.8
>> > 1.8
>> > 
>> > 
>> > 
>> > org.apache.maven.plugins
>> > maven-war-plugin
>> > 3.1.0
>> > 
>> > 
>> > 
>> >
>> > 
>> > 
>> > apache-m2-snapshot
>> > Apache Snapshot Repository
>> > https://repository.apache.org/content/groups/snapshots
>> > 
>> > 
>> > true
>> > 
>> > 
>> > 
>> >
>> > 
>> > 
>> > apache.snapshots
>> > http://repository.apache.org/snapshots/
>> > 
>> > 
>> >
>> > 
>> > 
>> > org.apache.tomee
>> > javaee-api
>> > 8.0
>> > provided
>> > 
>> > 
>> > org.eclipse.microprofile.openapi
>> > microprofile-openapi-api
>> > 1.1.2
>> > provided
>> > 
>> > 
>> > org.microprofile-ext.openapi-ext
>> > swagger-ui
>> > 1.0.1
>> > 
>> > 
>> > 
>> >
>> >
>> > My code:
>> >
>> > @ApplicationPath("api")@OpenAPIDefinition(info = @Info(
>> > title = "Example application",
>> > version = "1.0.0",
>> > contact = @Contact(
>> > name = "Otavio",
>> > email = "ota...@otavio.com",
>> > url = "http://www.otaviojava.com.br";)
>> > ),
>> > servers = {
>> > @Server(url = "/example", description = "localhost")
>> > }
>> > )public class MVCApplication extends Application {
>> > }
>> >
>> >
>> @Path("envs")@Produces(MediaType.APPLICATION_JSON)@Consumes(MediaType.APPLICATION_JSON)@Tag(name
>> > = "Config Retrieval service", description = "Get the value for a
>> > certain config")public class EnvironmentResource {
>> >
>> > @GET
>> > @Operation(description = "Get the envs")
>> > @APIResponses({
>> > @APIResponse(responseCode = "200", description =
>> > "Successful, returning the value")
>> > })
>> > public Map getEnvs() {
>> > return System.getenv();
>> > }
>> >
>> > @GET
>> > @Path("/{key}")
>> > @Operation(description = "Get the value for this key")
>> > @APIResponses({
>> > @APIResponse(responseCode = "200", description =
>> > "Successful, returning the value")
>> > })
>> > @Produces(MediaType.TEXT_PLAIN)
>> > public Response getConfigValue(@PathParam("key") String key) {
>> > return Response.ok(key).build();
>> > }
>> >
>> > }
>> >
>> >
>> > On Wed, Mar 27, 2019 at 5:11 PM Daniel Cunha 
>> > wrote:
>> >
>> > > Can you guys push your sample?
>> > >
>> > > On Wed, Mar 27, 2019, 4:58 PM Otávio Gonçalves de Santana <
>> > > osant...@tomitribe.com> wrote:
>> > >
>> > > > Hey Ivan.
>> > > > I tried something, and I saw the same issue. It seems this by-pass
>> does
>> > > not
>> > > > work.
>> > > >
>> > > > On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho <
>> > > ivanjunc...@gmail.com
>> > > > >
>> > > > wrote:
>> > > >
>> > > > > It didn't seem to work for me adding the property to
>> > system.properties.
>> > > > Any
>> > > > > ideas what I am doing wrong?
>> > > 

Re: @OpenAPIDefinition not working

2019-03-28 Thread Otávio Gonçalves de Santana
Yes, there is this line that does not do this verification:

 application = !InternalApplication.class.isInstance(application) ?
new InternalApplication(application) : application;


https://github.com/apache/tomee/blob/master/server/openejb-rest/src/main/java/org/apache/openejb/server/rest/RESTService.java#L224

On Thu, Mar 28, 2019 at 1:07 AM Daniel Cunha  wrote:

> It is not injecting the config values for
> org.microprofileext.openapi.swaggerui.Templates and yes,
> using openejb.cxf-rs.cache-application=false the issue still happening.
> Interesting..
>
> Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
> osant...@tomitribe.com> escreveu:
>
> > My maven configuration:
> >
> > http://maven.apache.org/POM/4.0.0";
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> > 4.0.0
> >
> > org.superbiz
> > env-tomee
> > war
> >
> > OpenEJB
> > OpenEJB :: Web Examples
> > 0.0.1-SNAPSHOT
> > http://tomee.apache.org
> >
> > 
> >
>  UTF-8
> > 8.0.0-M2
> > 
> >
> > 
> > env-tomee
> > 
> > 
> > org.apache.maven.plugins
> > maven-compiler-plugin
> > 3.5.1
> > 
> > 1.8
> > 1.8
> > 
> > 
> > 
> > org.apache.maven.plugins
> > maven-war-plugin
> > 3.1.0
> > 
> > 
> > 
> >
> > 
> > 
> > apache-m2-snapshot
> > Apache Snapshot Repository
> > https://repository.apache.org/content/groups/snapshots
> > 
> > 
> > true
> > 
> > 
> > 
> >
> > 
> > 
> > apache.snapshots
> > http://repository.apache.org/snapshots/
> > 
> > 
> >
> > 
> > 
> > org.apache.tomee
> > javaee-api
> > 8.0
> > provided
> > 
> > 
> > org.eclipse.microprofile.openapi
> > microprofile-openapi-api
> > 1.1.2
> > provided
> > 
> > 
> > org.microprofile-ext.openapi-ext
> > swagger-ui
> > 1.0.1
> > 
> > 
> > 
> >
> >
> > My code:
> >
> > @ApplicationPath("api")@OpenAPIDefinition(info = @Info(
> > title = "Example application",
> > version = "1.0.0",
> > contact = @Contact(
> > name = "Otavio",
> > email = "ota...@otavio.com",
> > url = "http://www.otaviojava.com.br";)
> > ),
> > servers = {
> > @Server(url = "/example", description = "localhost")
> > }
> > )public class MVCApplication extends Application {
> > }
> >
> >
> @Path("envs")@Produces(MediaType.APPLICATION_JSON)@Consumes(MediaType.APPLICATION_JSON)@Tag(name
> > = "Config Retrieval service", description = "Get the value for a
> > certain config")public class EnvironmentResource {
> >
> > @GET
> > @Operation(description = "Get the envs")
> > @APIResponses({
> > @APIResponse(responseCode = "200", description =
> > "Successful, returning the value")
> > })
> > public Map getEnvs() {
> > return System.getenv();
> > }
> >
> > @GET
> > @Path("/{key}")
> > @Operation(description = "Get the value for this key")
> > @APIResponses({
> > @APIResponse(responseCode = "200", description =
> > "Successful, returning the value")
> > })
> > @Produces(MediaType.TEXT_PLAIN)
> > public Response getConfigValue(@PathParam("key") String key) {
> > return Response.ok(key).build();
> > }
> >
> > }
> >
> >
> > On Wed, Mar 27, 2019 at 5:11 PM Daniel Cunha 
> > wrote:
> >
> > > Can you guys push your sample?
> > >
> > > On Wed, Mar 27, 2019, 4:58 PM Otávio Gonçalves de Santana <
> > > osant...@tomitribe.com> wrote:
> > >
> > > > Hey Ivan.
> > > > I tried something, and I saw the same issue. It seems this by-pass
> does
> > > not
> > > > work.
> > > >
> > > > On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho <
> > > ivanjunc...@gmail.com
> > > > >
> > > > wrote:
> > > >
> > > > > It didn't seem to work for me adding the property to
> > system.properties.
> > > > Any
> > > > > ideas what I am doing wrong?
> > > > >
> > > > > On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez <
> radcor...@yahoo.com>
> > > > > wrote:
> > > > >
> > > > > > Hi Ivan,
> > > > > >
> > > > > > Yes Romain is right, you should set
> > openejb.cxf-rs.cache-application
> > > =
> > > > > > false and it should work. We had to set that for the TCK to pass,
> > but
> > > > the
> > > > > > config never reached the final distribution. I did notice that
> and
> > > I’ve
> > > > > > added it in case a MP app is

Re: @OpenAPIDefinition not working

2019-03-27 Thread Daniel Cunha
It is not injecting the config values for
org.microprofileext.openapi.swaggerui.Templates and yes,
using openejb.cxf-rs.cache-application=false the issue still happening.
Interesting..

Em qua, 27 de mar de 2019 às 18:24, Otávio Gonçalves de Santana <
osant...@tomitribe.com> escreveu:

> My maven configuration:
>
> http://maven.apache.org/POM/4.0.0";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd";>
> 4.0.0
>
> org.superbiz
> env-tomee
> war
>
> OpenEJB
> OpenEJB :: Web Examples
> 0.0.1-SNAPSHOT
> http://tomee.apache.org
>
> 
> UTF-8
> 8.0.0-M2
> 
>
> 
> env-tomee
> 
> 
> org.apache.maven.plugins
> maven-compiler-plugin
> 3.5.1
> 
> 1.8
> 1.8
> 
> 
> 
> org.apache.maven.plugins
> maven-war-plugin
> 3.1.0
> 
> 
> 
>
> 
> 
> apache-m2-snapshot
> Apache Snapshot Repository
> https://repository.apache.org/content/groups/snapshots
> 
> 
> true
> 
> 
> 
>
> 
> 
> apache.snapshots
> http://repository.apache.org/snapshots/
> 
> 
>
> 
> 
> org.apache.tomee
> javaee-api
> 8.0
> provided
> 
> 
> org.eclipse.microprofile.openapi
> microprofile-openapi-api
> 1.1.2
> provided
> 
> 
> org.microprofile-ext.openapi-ext
> swagger-ui
> 1.0.1
> 
> 
> 
>
>
> My code:
>
> @ApplicationPath("api")@OpenAPIDefinition(info = @Info(
> title = "Example application",
> version = "1.0.0",
> contact = @Contact(
> name = "Otavio",
> email = "ota...@otavio.com",
> url = "http://www.otaviojava.com.br";)
> ),
> servers = {
> @Server(url = "/example", description = "localhost")
> }
> )public class MVCApplication extends Application {
> }
>
> @Path("envs")@Produces(MediaType.APPLICATION_JSON)@Consumes(MediaType.APPLICATION_JSON)@Tag(name
> = "Config Retrieval service", description = "Get the value for a
> certain config")public class EnvironmentResource {
>
> @GET
> @Operation(description = "Get the envs")
> @APIResponses({
> @APIResponse(responseCode = "200", description =
> "Successful, returning the value")
> })
> public Map getEnvs() {
> return System.getenv();
> }
>
> @GET
> @Path("/{key}")
> @Operation(description = "Get the value for this key")
> @APIResponses({
> @APIResponse(responseCode = "200", description =
> "Successful, returning the value")
> })
> @Produces(MediaType.TEXT_PLAIN)
> public Response getConfigValue(@PathParam("key") String key) {
> return Response.ok(key).build();
> }
>
> }
>
>
> On Wed, Mar 27, 2019 at 5:11 PM Daniel Cunha 
> wrote:
>
> > Can you guys push your sample?
> >
> > On Wed, Mar 27, 2019, 4:58 PM Otávio Gonçalves de Santana <
> > osant...@tomitribe.com> wrote:
> >
> > > Hey Ivan.
> > > I tried something, and I saw the same issue. It seems this by-pass does
> > not
> > > work.
> > >
> > > On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho <
> > ivanjunc...@gmail.com
> > > >
> > > wrote:
> > >
> > > > It didn't seem to work for me adding the property to
> system.properties.
> > > Any
> > > > ideas what I am doing wrong?
> > > >
> > > > On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez 
> > > > wrote:
> > > >
> > > > > Hi Ivan,
> > > > >
> > > > > Yes Romain is right, you should set
> openejb.cxf-rs.cache-application
> > =
> > > > > false and it should work. We had to set that for the TCK to pass,
> but
> > > the
> > > > > config never reached the final distribution. I did notice that and
> > I’ve
> > > > > added it in case a MP app is detected, but it was after M2 was
> > > released.
> > > > >
> > > > > Cheers,
> > > > > Roberto
> > > > >
> > > > > On 8 Feb 2019, at 21:06, Ivan Junckes Filho  >
> > > > wrote:
> > > > >
> > > > > I will take a look thanks again Romain
> > > > >
> > > > > On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau <
> > > rmannibu...@gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > >> Hey, just recalled we had a flag about it,
> > > > >>
> > > > >> you can skip it setting openejb.cxf-rs.cache-application=false
> > > > >>
> > > > >> Romain Manni-Bucau
> > > > >> @rmannibucau  |  Blog
> > > > >>  | Old Blog
> > > > >>  | Github <
> 

Re: @OpenAPIDefinition not working

2019-03-27 Thread Otávio Gonçalves de Santana
My maven configuration:

http://maven.apache.org/POM/4.0.0";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
4.0.0

org.superbiz
env-tomee
war

OpenEJB
OpenEJB :: Web Examples
0.0.1-SNAPSHOT
http://tomee.apache.org


UTF-8
8.0.0-M2



env-tomee


org.apache.maven.plugins
maven-compiler-plugin
3.5.1

1.8
1.8



org.apache.maven.plugins
maven-war-plugin
3.1.0






apache-m2-snapshot
Apache Snapshot Repository
https://repository.apache.org/content/groups/snapshots

true






apache.snapshots
http://repository.apache.org/snapshots/





org.apache.tomee
javaee-api
8.0
provided


org.eclipse.microprofile.openapi
microprofile-openapi-api
1.1.2
provided


org.microprofile-ext.openapi-ext
swagger-ui
1.0.1





My code:

@ApplicationPath("api")@OpenAPIDefinition(info = @Info(
title = "Example application",
version = "1.0.0",
contact = @Contact(
name = "Otavio",
email = "ota...@otavio.com",
url = "http://www.otaviojava.com.br";)
),
servers = {
@Server(url = "/example", description = "localhost")
}
)public class MVCApplication extends Application {
}
@Path("envs")@Produces(MediaType.APPLICATION_JSON)@Consumes(MediaType.APPLICATION_JSON)@Tag(name
= "Config Retrieval service", description = "Get the value for a
certain config")public class EnvironmentResource {

@GET
@Operation(description = "Get the envs")
@APIResponses({
@APIResponse(responseCode = "200", description =
"Successful, returning the value")
})
public Map getEnvs() {
return System.getenv();
}

@GET
@Path("/{key}")
@Operation(description = "Get the value for this key")
@APIResponses({
@APIResponse(responseCode = "200", description =
"Successful, returning the value")
})
@Produces(MediaType.TEXT_PLAIN)
public Response getConfigValue(@PathParam("key") String key) {
return Response.ok(key).build();
}

}


On Wed, Mar 27, 2019 at 5:11 PM Daniel Cunha  wrote:

> Can you guys push your sample?
>
> On Wed, Mar 27, 2019, 4:58 PM Otávio Gonçalves de Santana <
> osant...@tomitribe.com> wrote:
>
> > Hey Ivan.
> > I tried something, and I saw the same issue. It seems this by-pass does
> not
> > work.
> >
> > On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho <
> ivanjunc...@gmail.com
> > >
> > wrote:
> >
> > > It didn't seem to work for me adding the property to system.properties.
> > Any
> > > ideas what I am doing wrong?
> > >
> > > On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez 
> > > wrote:
> > >
> > > > Hi Ivan,
> > > >
> > > > Yes Romain is right, you should set openejb.cxf-rs.cache-application
> =
> > > > false and it should work. We had to set that for the TCK to pass, but
> > the
> > > > config never reached the final distribution. I did notice that and
> I’ve
> > > > added it in case a MP app is detected, but it was after M2 was
> > released.
> > > >
> > > > Cheers,
> > > > Roberto
> > > >
> > > > On 8 Feb 2019, at 21:06, Ivan Junckes Filho 
> > > wrote:
> > > >
> > > > I will take a look thanks again Romain
> > > >
> > > > On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau <
> > rmannibu...@gmail.com
> > > >
> > > > wrote:
> > > >
> > > >> Hey, just recalled we had a flag about it,
> > > >>
> > > >> you can skip it setting openejb.cxf-rs.cache-application=false
> > > >>
> > > >> Romain Manni-Bucau
> > > >> @rmannibucau  |  Blog
> > > >>  | Old Blog
> > > >>  | Github <
> > > >> https://github.com/rmannibucau> |
> > > >> LinkedIn  | Book
> > > >> <
> > > >>
> > >
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > > >> >
> > > >>
> > > >>
> > > >> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho <
> > ivanjunc...@gmail.com
> > > >
> > > >> a
> > > >> écrit :
> > > >>
> > > >> > Interesting, ok thanks Romain.
> > > >> >
> > > >> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau <
> > > >> rmannibu...@gmail.com>
> > > >> > wrote:
> > > >> >
> > > >> >> Hi Ivan,
> > > >> >>
> > > >> >> In a few cases - don't recall out of my head if it 

Re: @OpenAPIDefinition not working

2019-03-27 Thread Daniel Cunha
Can you guys push your sample?

On Wed, Mar 27, 2019, 4:58 PM Otávio Gonçalves de Santana <
osant...@tomitribe.com> wrote:

> Hey Ivan.
> I tried something, and I saw the same issue. It seems this by-pass does not
> work.
>
> On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho  >
> wrote:
>
> > It didn't seem to work for me adding the property to system.properties.
> Any
> > ideas what I am doing wrong?
> >
> > On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez 
> > wrote:
> >
> > > Hi Ivan,
> > >
> > > Yes Romain is right, you should set openejb.cxf-rs.cache-application =
> > > false and it should work. We had to set that for the TCK to pass, but
> the
> > > config never reached the final distribution. I did notice that and I’ve
> > > added it in case a MP app is detected, but it was after M2 was
> released.
> > >
> > > Cheers,
> > > Roberto
> > >
> > > On 8 Feb 2019, at 21:06, Ivan Junckes Filho 
> > wrote:
> > >
> > > I will take a look thanks again Romain
> > >
> > > On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau <
> rmannibu...@gmail.com
> > >
> > > wrote:
> > >
> > >> Hey, just recalled we had a flag about it,
> > >>
> > >> you can skip it setting openejb.cxf-rs.cache-application=false
> > >>
> > >> Romain Manni-Bucau
> > >> @rmannibucau  |  Blog
> > >>  | Old Blog
> > >>  | Github <
> > >> https://github.com/rmannibucau> |
> > >> LinkedIn  | Book
> > >> <
> > >>
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >> >
> > >>
> > >>
> > >> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho <
> ivanjunc...@gmail.com
> > >
> > >> a
> > >> écrit :
> > >>
> > >> > Interesting, ok thanks Romain.
> > >> >
> > >> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau <
> > >> rmannibu...@gmail.com>
> > >> > wrote:
> > >> >
> > >> >> Hi Ivan,
> > >> >>
> > >> >> In a few cases - don't recall out of my head if it is all - TomEE
> > wraps
> > >> >> user application in InternalApplication. IIRC it was for caching
> > >> reason -
> > >> >> TomEE not being super cleanly aligned on CDI + to avoid to get
> > multiple
> > >> >> instances between runtime and deployment which can break user code.
> > >> >> Enhancing TomEE to no do it anymore or not use a wrapper when not
> > >> needed
> > >> >> can be a first step fixing that.
> > >> >>
> > >> >> Romain Manni-Bucau
> > >> >> @rmannibucau  |  Blog
> > >> >>  | Old Blog
> > >> >>  | Github
> > >> >>  | LinkedIn
> > >> >>  | Book
> > >> >> <
> > >>
> >
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> > >> >
> > >> >>
> > >> >>
> > >> >> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho <
> > >> ivanjunc...@gmail.com>
> > >> >> a écrit :
> > >> >>
> > >> >>> The @OpenAPIDefinition is not being picked up by the CDI extension
> > >> >>> because it is only getting InternalApplication instead of picking
> up
> > >> my
> > >> >>> custom Application config. Any ideas why? OpenAPIDefinition
> configs
> > >> are
> > >> >>> therefore not showing up in the openapi doc.
> > >> >>>
> > >> >>>
> > >> >>> @OpenAPIDefinition(info =
> > >> >>> @Info(
> > >> >>> title = "TEST",
> > >> >>> version = "2.0",
> > >> >>> description = "Pet Store App API",
> > >> >>> license = @License(
> > >> >>> name = "Apache 2.0",
> > >> >>> url = "
> > >> http://www.apache.org/licenses/LICENSE-2.0.html";),
> > >> >>> contact = @Contact(
> > >> >>> name = "PetStore API Support",
> > >> >>> url = "
> > >> https://github.com/eclipse/microprofile-open-api";,
> > >> >>> email = "supp...@petstore.com")
> > >> >>> ),
> > >> >>> security = @SecurityRequirement(name = "oauth2"),
> > >> >>> servers = @Server(url = "/test/"))
> > >> >>> @ApplicationPath("/api")
> > >> >>> @LoginConfig(authMethod = "MP-JWT")
> > >> >>> public class ApplicationConfiguration extends Application {
> > >> >>>
> > >> >>>
> > >>
> > >
> > >
> >
>


Re: @OpenAPIDefinition not working

2019-03-27 Thread Otávio Gonçalves de Santana
Hey Ivan.
I tried something, and I saw the same issue. It seems this by-pass does not
work.

On Mon, Feb 11, 2019 at 11:18 AM Ivan Junckes Filho 
wrote:

> It didn't seem to work for me adding the property to system.properties. Any
> ideas what I am doing wrong?
>
> On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez 
> wrote:
>
> > Hi Ivan,
> >
> > Yes Romain is right, you should set openejb.cxf-rs.cache-application =
> > false and it should work. We had to set that for the TCK to pass, but the
> > config never reached the final distribution. I did notice that and I’ve
> > added it in case a MP app is detected, but it was after M2 was released.
> >
> > Cheers,
> > Roberto
> >
> > On 8 Feb 2019, at 21:06, Ivan Junckes Filho 
> wrote:
> >
> > I will take a look thanks again Romain
> >
> > On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau  >
> > wrote:
> >
> >> Hey, just recalled we had a flag about it,
> >>
> >> you can skip it setting openejb.cxf-rs.cache-application=false
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau  |  Blog
> >>  | Old Blog
> >>  | Github <
> >> https://github.com/rmannibucau> |
> >> LinkedIn  | Book
> >> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >> >
> >>
> >>
> >> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho  >
> >> a
> >> écrit :
> >>
> >> > Interesting, ok thanks Romain.
> >> >
> >> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau <
> >> rmannibu...@gmail.com>
> >> > wrote:
> >> >
> >> >> Hi Ivan,
> >> >>
> >> >> In a few cases - don't recall out of my head if it is all - TomEE
> wraps
> >> >> user application in InternalApplication. IIRC it was for caching
> >> reason -
> >> >> TomEE not being super cleanly aligned on CDI + to avoid to get
> multiple
> >> >> instances between runtime and deployment which can break user code.
> >> >> Enhancing TomEE to no do it anymore or not use a wrapper when not
> >> needed
> >> >> can be a first step fixing that.
> >> >>
> >> >> Romain Manni-Bucau
> >> >> @rmannibucau  |  Blog
> >> >>  | Old Blog
> >> >>  | Github
> >> >>  | LinkedIn
> >> >>  | Book
> >> >> <
> >>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >> >
> >> >>
> >> >>
> >> >> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho <
> >> ivanjunc...@gmail.com>
> >> >> a écrit :
> >> >>
> >> >>> The @OpenAPIDefinition is not being picked up by the CDI extension
> >> >>> because it is only getting InternalApplication instead of picking up
> >> my
> >> >>> custom Application config. Any ideas why? OpenAPIDefinition configs
> >> are
> >> >>> therefore not showing up in the openapi doc.
> >> >>>
> >> >>>
> >> >>> @OpenAPIDefinition(info =
> >> >>> @Info(
> >> >>> title = "TEST",
> >> >>> version = "2.0",
> >> >>> description = "Pet Store App API",
> >> >>> license = @License(
> >> >>> name = "Apache 2.0",
> >> >>> url = "
> >> http://www.apache.org/licenses/LICENSE-2.0.html";),
> >> >>> contact = @Contact(
> >> >>> name = "PetStore API Support",
> >> >>> url = "
> >> https://github.com/eclipse/microprofile-open-api";,
> >> >>> email = "supp...@petstore.com")
> >> >>> ),
> >> >>> security = @SecurityRequirement(name = "oauth2"),
> >> >>> servers = @Server(url = "/test/"))
> >> >>> @ApplicationPath("/api")
> >> >>> @LoginConfig(authMethod = "MP-JWT")
> >> >>> public class ApplicationConfiguration extends Application {
> >> >>>
> >> >>>
> >>
> >
> >
>


Re: @OpenAPIDefinition not working

2019-02-11 Thread Ivan Junckes Filho
It didn't seem to work for me adding the property to system.properties. Any
ideas what I am doing wrong?

On Sat, Feb 9, 2019 at 10:21 AM Roberto Cortez  wrote:

> Hi Ivan,
>
> Yes Romain is right, you should set openejb.cxf-rs.cache-application =
> false and it should work. We had to set that for the TCK to pass, but the
> config never reached the final distribution. I did notice that and I’ve
> added it in case a MP app is detected, but it was after M2 was released.
>
> Cheers,
> Roberto
>
> On 8 Feb 2019, at 21:06, Ivan Junckes Filho  wrote:
>
> I will take a look thanks again Romain
>
> On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau 
> wrote:
>
>> Hey, just recalled we had a flag about it,
>>
>> you can skip it setting openejb.cxf-rs.cache-application=false
>>
>> Romain Manni-Bucau
>> @rmannibucau  |  Blog
>>  | Old Blog
>>  | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn  | Book
>> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >
>>
>>
>> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho 
>> a
>> écrit :
>>
>> > Interesting, ok thanks Romain.
>> >
>> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau <
>> rmannibu...@gmail.com>
>> > wrote:
>> >
>> >> Hi Ivan,
>> >>
>> >> In a few cases - don't recall out of my head if it is all - TomEE wraps
>> >> user application in InternalApplication. IIRC it was for caching
>> reason -
>> >> TomEE not being super cleanly aligned on CDI + to avoid to get multiple
>> >> instances between runtime and deployment which can break user code.
>> >> Enhancing TomEE to no do it anymore or not use a wrapper when not
>> needed
>> >> can be a first step fixing that.
>> >>
>> >> Romain Manni-Bucau
>> >> @rmannibucau  |  Blog
>> >>  | Old Blog
>> >>  | Github
>> >>  | LinkedIn
>> >>  | Book
>> >> <
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >
>> >>
>> >>
>> >> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho <
>> ivanjunc...@gmail.com>
>> >> a écrit :
>> >>
>> >>> The @OpenAPIDefinition is not being picked up by the CDI extension
>> >>> because it is only getting InternalApplication instead of picking up
>> my
>> >>> custom Application config. Any ideas why? OpenAPIDefinition configs
>> are
>> >>> therefore not showing up in the openapi doc.
>> >>>
>> >>>
>> >>> @OpenAPIDefinition(info =
>> >>> @Info(
>> >>> title = "TEST",
>> >>> version = "2.0",
>> >>> description = "Pet Store App API",
>> >>> license = @License(
>> >>> name = "Apache 2.0",
>> >>> url = "
>> http://www.apache.org/licenses/LICENSE-2.0.html";),
>> >>> contact = @Contact(
>> >>> name = "PetStore API Support",
>> >>> url = "
>> https://github.com/eclipse/microprofile-open-api";,
>> >>> email = "supp...@petstore.com")
>> >>> ),
>> >>> security = @SecurityRequirement(name = "oauth2"),
>> >>> servers = @Server(url = "/test/"))
>> >>> @ApplicationPath("/api")
>> >>> @LoginConfig(authMethod = "MP-JWT")
>> >>> public class ApplicationConfiguration extends Application {
>> >>>
>> >>>
>>
>
>


Re: @OpenAPIDefinition not working

2019-02-09 Thread Roberto Cortez
Hi Ivan,

Yes Romain is right, you should set openejb.cxf-rs.cache-application = false 
and it should work. We had to set that for the TCK to pass, but the config 
never reached the final distribution. I did notice that and I’ve added it in 
case a MP app is detected, but it was after M2 was released.

Cheers,
Roberto 

> On 8 Feb 2019, at 21:06, Ivan Junckes Filho  wrote:
> 
> I will take a look thanks again Romain
> 
> On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau  > wrote:
> Hey, just recalled we had a flag about it,
> 
> you can skip it setting openejb.cxf-rs.cache-application=false
> 
> Romain Manni-Bucau
> @rmannibucau  > |  Blog
> > | Old 
> Blog
> > | 
> Github > |
> LinkedIn  > | Book
>  >
> 
> 
> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho  > a
> écrit :
> 
> > Interesting, ok thanks Romain.
> >
> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau  > >
> > wrote:
> >
> >> Hi Ivan,
> >>
> >> In a few cases - don't recall out of my head if it is all - TomEE wraps
> >> user application in InternalApplication. IIRC it was for caching reason -
> >> TomEE not being super cleanly aligned on CDI + to avoid to get multiple
> >> instances between runtime and deployment which can break user code.
> >> Enhancing TomEE to no do it anymore or not use a wrapper when not needed
> >> can be a first step fixing that.
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau  >> > |  Blog
> >> > | 
> >> Old Blog
> >> > | 
> >> Github
> >> > | 
> >> LinkedIn
> >>  >> > | Book
> >>  >>  
> >> >
> >>
> >>
> >> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho  >> >
> >> a écrit :
> >>
> >>> The @OpenAPIDefinition is not being picked up by the CDI extension
> >>> because it is only getting InternalApplication instead of picking up my
> >>> custom Application config. Any ideas why? OpenAPIDefinition configs are
> >>> therefore not showing up in the openapi doc.
> >>>
> >>>
> >>> @OpenAPIDefinition(info =
> >>> @Info(
> >>> title = "TEST",
> >>> version = "2.0",
> >>> description = "Pet Store App API",
> >>> license = @License(
> >>> name = "Apache 2.0",
> >>> url = 
> >>> "http://www.apache.org/licenses/LICENSE-2.0.html 
> >>> "),
> >>> contact = @Contact(
> >>> name = "PetStore API Support",
> >>> url = 
> >>> "https://github.com/eclipse/microprofile-open-api 
> >>> ",
> >>> email = "supp...@petstore.com 
> >>> ")
> >>> ),
> >>> security = @SecurityRequirement(name = "oauth2"),
> >>> servers = @Server(url = "/test/"))
> >>> @ApplicationPath("/api")
> >>> @LoginConfig(authMethod = "MP-JWT")
> >>> public class ApplicationConfiguration extends Application {
> >>>
> >>>



Re: @OpenAPIDefinition not working

2019-02-08 Thread Ivan Junckes Filho
I will take a look thanks again Romain

On Fri, Feb 8, 2019 at 4:38 PM Romain Manni-Bucau 
wrote:

> Hey, just recalled we had a flag about it,
>
> you can skip it setting openejb.cxf-rs.cache-application=false
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github <
> https://github.com/rmannibucau> |
> LinkedIn  | Book
> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
>
>
> Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho  a
> écrit :
>
> > Interesting, ok thanks Romain.
> >
> > On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau  >
> > wrote:
> >
> >> Hi Ivan,
> >>
> >> In a few cases - don't recall out of my head if it is all - TomEE wraps
> >> user application in InternalApplication. IIRC it was for caching reason
> -
> >> TomEE not being super cleanly aligned on CDI + to avoid to get multiple
> >> instances between runtime and deployment which can break user code.
> >> Enhancing TomEE to no do it anymore or not use a wrapper when not needed
> >> can be a first step fixing that.
> >>
> >> Romain Manni-Bucau
> >> @rmannibucau  |  Blog
> >>  | Old Blog
> >>  | Github
> >>  | LinkedIn
> >>  | Book
> >> <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >>
> >>
> >> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho  >
> >> a écrit :
> >>
> >>> The @OpenAPIDefinition is not being picked up by the CDI extension
> >>> because it is only getting InternalApplication instead of picking up my
> >>> custom Application config. Any ideas why? OpenAPIDefinition configs are
> >>> therefore not showing up in the openapi doc.
> >>>
> >>>
> >>> @OpenAPIDefinition(info =
> >>> @Info(
> >>> title = "TEST",
> >>> version = "2.0",
> >>> description = "Pet Store App API",
> >>> license = @License(
> >>> name = "Apache 2.0",
> >>> url = "
> http://www.apache.org/licenses/LICENSE-2.0.html";),
> >>> contact = @Contact(
> >>> name = "PetStore API Support",
> >>> url = "
> https://github.com/eclipse/microprofile-open-api";,
> >>> email = "supp...@petstore.com")
> >>> ),
> >>> security = @SecurityRequirement(name = "oauth2"),
> >>> servers = @Server(url = "/test/"))
> >>> @ApplicationPath("/api")
> >>> @LoginConfig(authMethod = "MP-JWT")
> >>> public class ApplicationConfiguration extends Application {
> >>>
> >>>
>


Re: @OpenAPIDefinition not working

2019-02-08 Thread Romain Manni-Bucau
Hey, just recalled we had a flag about it,

you can skip it setting openejb.cxf-rs.cache-application=false

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le ven. 8 févr. 2019 à 19:01, Ivan Junckes Filho  a
écrit :

> Interesting, ok thanks Romain.
>
> On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau 
> wrote:
>
>> Hi Ivan,
>>
>> In a few cases - don't recall out of my head if it is all - TomEE wraps
>> user application in InternalApplication. IIRC it was for caching reason -
>> TomEE not being super cleanly aligned on CDI + to avoid to get multiple
>> instances between runtime and deployment which can break user code.
>> Enhancing TomEE to no do it anymore or not use a wrapper when not needed
>> can be a first step fixing that.
>>
>> Romain Manni-Bucau
>> @rmannibucau  |  Blog
>>  | Old Blog
>>  | Github
>>  | LinkedIn
>>  | Book
>> 
>>
>>
>> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho 
>> a écrit :
>>
>>> The @OpenAPIDefinition is not being picked up by the CDI extension
>>> because it is only getting InternalApplication instead of picking up my
>>> custom Application config. Any ideas why? OpenAPIDefinition configs are
>>> therefore not showing up in the openapi doc.
>>>
>>>
>>> @OpenAPIDefinition(info =
>>> @Info(
>>> title = "TEST",
>>> version = "2.0",
>>> description = "Pet Store App API",
>>> license = @License(
>>> name = "Apache 2.0",
>>> url = 
>>> "http://www.apache.org/licenses/LICENSE-2.0.html";),
>>> contact = @Contact(
>>> name = "PetStore API Support",
>>> url = 
>>> "https://github.com/eclipse/microprofile-open-api";,
>>> email = "supp...@petstore.com")
>>> ),
>>> security = @SecurityRequirement(name = "oauth2"),
>>> servers = @Server(url = "/test/"))
>>> @ApplicationPath("/api")
>>> @LoginConfig(authMethod = "MP-JWT")
>>> public class ApplicationConfiguration extends Application {
>>>
>>>


Re: @OpenAPIDefinition not working

2019-02-08 Thread Ivan Junckes Filho
Interesting, ok thanks Romain.

On Fri, Feb 8, 2019 at 3:29 PM Romain Manni-Bucau 
wrote:

> Hi Ivan,
>
> In a few cases - don't recall out of my head if it is all - TomEE wraps
> user application in InternalApplication. IIRC it was for caching reason -
> TomEE not being super cleanly aligned on CDI + to avoid to get multiple
> instances between runtime and deployment which can break user code.
> Enhancing TomEE to no do it anymore or not use a wrapper when not needed
> can be a first step fixing that.
>
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github
>  | LinkedIn
>  | Book
> 
>
>
> Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho 
> a écrit :
>
>> The @OpenAPIDefinition is not being picked up by the CDI extension
>> because it is only getting InternalApplication instead of picking up my
>> custom Application config. Any ideas why? OpenAPIDefinition configs are
>> therefore not showing up in the openapi doc.
>>
>>
>> @OpenAPIDefinition(info =
>> @Info(
>> title = "TEST",
>> version = "2.0",
>> description = "Pet Store App API",
>> license = @License(
>> name = "Apache 2.0",
>> url = 
>> "http://www.apache.org/licenses/LICENSE-2.0.html";),
>> contact = @Contact(
>> name = "PetStore API Support",
>> url = 
>> "https://github.com/eclipse/microprofile-open-api";,
>> email = "supp...@petstore.com")
>> ),
>> security = @SecurityRequirement(name = "oauth2"),
>> servers = @Server(url = "/test/"))
>> @ApplicationPath("/api")
>> @LoginConfig(authMethod = "MP-JWT")
>> public class ApplicationConfiguration extends Application {
>>
>>


Re: @OpenAPIDefinition not working

2019-02-08 Thread Romain Manni-Bucau
Hi Ivan,

In a few cases - don't recall out of my head if it is all - TomEE wraps
user application in InternalApplication. IIRC it was for caching reason -
TomEE not being super cleanly aligned on CDI + to avoid to get multiple
instances between runtime and deployment which can break user code.
Enhancing TomEE to no do it anymore or not use a wrapper when not needed
can be a first step fixing that.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le ven. 8 févr. 2019 à 18:14, Ivan Junckes Filho  a
écrit :

> The @OpenAPIDefinition is not being picked up by the CDI extension because
> it is only getting InternalApplication instead of picking up my custom
> Application config. Any ideas why? OpenAPIDefinition configs are therefore
> not showing up in the openapi doc.
>
>
> @OpenAPIDefinition(info =
> @Info(
> title = "TEST",
> version = "2.0",
> description = "Pet Store App API",
> license = @License(
> name = "Apache 2.0",
> url = 
> "http://www.apache.org/licenses/LICENSE-2.0.html";),
> contact = @Contact(
> name = "PetStore API Support",
> url = 
> "https://github.com/eclipse/microprofile-open-api";,
> email = "supp...@petstore.com")
> ),
> security = @SecurityRequirement(name = "oauth2"),
> servers = @Server(url = "/test/"))
> @ApplicationPath("/api")
> @LoginConfig(authMethod = "MP-JWT")
> public class ApplicationConfiguration extends Application {
>
>


@OpenAPIDefinition not working

2019-02-08 Thread Ivan Junckes Filho
The @OpenAPIDefinition is not being picked up by the CDI extension because
it is only getting InternalApplication instead of picking up my custom
Application config. Any ideas why? OpenAPIDefinition configs are therefore
not showing up in the openapi doc.


@OpenAPIDefinition(info =
@Info(
title = "TEST",
version = "2.0",
description = "Pet Store App API",
license = @License(
name = "Apache 2.0",
url =
"http://www.apache.org/licenses/LICENSE-2.0.html";),
contact = @Contact(
name = "PetStore API Support",
url =
"https://github.com/eclipse/microprofile-open-api";,
email = "supp...@petstore.com")
),
security = @SecurityRequirement(name = "oauth2"),
servers = @Server(url = "/test/"))
@ApplicationPath("/api")
@LoginConfig(authMethod = "MP-JWT")
public class ApplicationConfiguration extends Application {