From dev-return-99763-apmail-geronimo-dev-archive=geronimo.apache.org@geronimo.apache.org Fri Feb 8 18:01:02 2019 Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 09F9718A95 for ; Fri, 8 Feb 2019 18:01:02 +0000 (UTC) Received: (qmail 44867 invoked by uid 500); 8 Feb 2019 18:01:01 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 44815 invoked by uid 500); 8 Feb 2019 18:01:01 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 44496 invoked by uid 99); 8 Feb 2019 18:01:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Feb 2019 18:01:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 92FD5CE5F3 for ; Fri, 8 Feb 2019 18:01:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YorNlR0M6eDN for ; Fri, 8 Feb 2019 18:00:59 +0000 (UTC) Received: from mail-it1-f176.google.com (mail-it1-f176.google.com [209.85.166.176]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 8A7B75FAC6 for ; Fri, 8 Feb 2019 18:00:58 +0000 (UTC) Received: by mail-it1-f176.google.com with SMTP id r6so11124363itk.0 for ; Fri, 08 Feb 2019 10:00:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RtoM5wZ1sc2vyyhPfcjoWSDTUxMrDILphHxmYnaXBdk=; b=LSWEyiJd3atnRBFhDiEw7G+MVWzXFbprztaKMC1OVCrsMEHn7yAS/2vJPw90Ic5sfC TTWl/4h6T5b6OGo5MzrT+ELzyZR8TPimIglZXDnl9iHtNu6R9CmF/tw+e2+ePyIguf1p m/q5pCyCRiTfU06yi5f/UahW/WABhOyxC6dl5D5Sbe8O3yda9QodWwdlbEdWgKBoIjmJ Nj3DmLNy6DQXQq+rIr0C/FlGXQZVRFNik/zg8+6Q+39LeLgQS3tGz7TD2azOjHGr6g8G ++OcUO+OXp04bw088U6Z4rLd7I8yL/QO6XRXfxPOn7M79TH4YgrnpMshNx2eryx3xozG g6Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RtoM5wZ1sc2vyyhPfcjoWSDTUxMrDILphHxmYnaXBdk=; b=I7S4tGNkLKpuQ+7BRWWsBoJdi2bzl6Ad0ZukAOHX6pv4zxUFroPBdMjJWsl9Kyos8N cy1rKw5tETkgX16UEYSz+MC0K3jO5s4irfQSfIMBbpMIjMIKIQWV0YtCagah3zl+vAnA LdtGvXnujjUnfbcPUiXIx0Wyu+wxeIHNwefZtDkv8Fr04V8Xce5CstxGP2u2IrFKuB1t 5G+TgyayWxymb5ylSp5DpZO9fzxiDsXI3aOcHoCTyfJr//NdNNM53k9gZOmePdwaB0me svcLHR//6gDPO1uAzeHDk2MLHh/0NU28aW9oLsA3tTjen3QV2LaAxs/VG6caPtsOeFKP MFwg== X-Gm-Message-State: AHQUAubqHzX3+zi8qS21LHLF5edTk0+bGqi+8HQ5LJnySOxXdQrGtmhY ZY58YFRVWZgIGlf5JIJgXGcefAJA/SlUEXIl7fkQ6A== X-Google-Smtp-Source: AHgI3IajuhLm+CkcKq96R33Gsv2uOm2pQqJ2dR7hTO7Tz1Qf5Q9JirlhNGZm15G5j1AQ2zUiMh7t6uz2PYGLtrSnpWo= X-Received: by 2002:a24:2f08:: with SMTP id j8mr10038047itj.42.1549648857112; Fri, 08 Feb 2019 10:00:57 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ivan Junckes Filho Date: Fri, 8 Feb 2019 16:00:45 -0200 Message-ID: Subject: Re: @OpenAPIDefinition not working To: dev@geronimo.apache.org Cc: dev@tomee.apache.org Content-Type: multipart/alternative; boundary="000000000000a7a669058165bd51" --000000000000a7a669058165bd51 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A9vr. 2019 =C3=A0 18:14, Ivan Junckes Filho > a =C3=A9crit : > >> 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 =3D >> @Info( >> title =3D "TEST", >> version =3D "2.0", >> description =3D "Pet Store App API", >> license =3D @License( >> name =3D "Apache 2.0", >> url =3D "http://www.apache.org/licenses/LICENSE-= 2.0.html"), >> contact =3D @Contact( >> name =3D "PetStore API Support", >> url =3D "https://github.com/eclipse/microprofile= -open-api", >> email =3D "support@petstore.com") >> ), >> security =3D @SecurityRequirement(name =3D "oauth2"), >> servers =3D @Server(url =3D "/test/")) >> @ApplicationPath("/api") >> @LoginConfig(authMethod =3D "MP-JWT") >> public class ApplicationConfiguration extends Application { >> >> --000000000000a7a669058165bd51 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Interesting, ok thanks Romain.

On Fri, Feb 8, 2019 at 3:29 = PM Romain Manni-Bucau <rmannibu= cau@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 s= uper cleanly aligned on CDI + to avoid to get multiple instances between ru= ntime 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 th= at.
=

= Romain Manni-Bucau
@rmannibucau | =C2=A0Blog=C2= =A0| Old Blo= g |=C2=A0G= ithub=C2=A0| LinkedIn=C2=A0| Book
<= /div>


Le=C2=A0ven. 8 f=C3=A9vr= . 2019 =C3=A0=C2=A018:14, Ivan Junckes Filho <ivanjunckes@gmail.com> a =C3=A9crit= =C2=A0:
The @OpenAPIDefinition is not be= ing picked up by the CDI extension because it is only getting InternalAppli= cation instead of picking up my custom Application config. Any ideas why? O= penAPIDefinition configs are therefore not showing up in the openapi doc.

@OpenAPIDef= inition(info =3D
@In= fo(
title =3D "TEST",
version =3D "2.0", description =3D "Pet Store App API",
license= =3D @License(
= name =3D &qu= ot;Apache 2.0",
url =3D "http://www.apache.org/lic= enses/LICENSE-2.0.html"),
contact =3D @Contact(
= name =3D "PetS= tore API Support",
url =3D "https://github.com/ecl= ipse/microprofile-open-api",
ema= il =3D "support@petstore.com&qu= ot;)
),
security =3D @SecurityRequirement(name =3D "oauth2"),
servers = =3D @Server(url =3D "/test/"))
@ApplicationPath("/api")
@LoginConfig(authMethod =3D "MP-JWT")
public class Applicatio= nConfiguration extends = Application {
--000000000000a7a669058165bd51--