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

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 >

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

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,

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

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

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

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

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

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

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: > > >

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

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

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

2019-05-14 Thread David Blevins
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: >>> >>

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,

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

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

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 =

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

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,

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;

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

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

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

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

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

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

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 >

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

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

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.

@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(