From commits-return-48685-archive-asf-public=cust-asf.ponee.io@cxf.apache.org Wed Feb 21 12:48:02 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E6EEE18061A for ; Wed, 21 Feb 2018 12:48:01 +0100 (CET) Received: (qmail 87382 invoked by uid 500); 21 Feb 2018 11:48:01 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 87373 invoked by uid 99); 21 Feb 2018 11:48:00 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 11:48:00 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id D3FE881F90; Wed, 21 Feb 2018 11:47:58 +0000 (UTC) Date: Wed, 21 Feb 2018 11:47:57 +0000 To: "commits@cxf.apache.org" Subject: [cxf] branch master updated: CXF-7654 - Swagger 2 document doesn't contain Info/BasePath on Karaf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <151921367794.18416.83549092025813726@gitbox.apache.org> From: coheigea@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: cxf X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 208b6c476c3361bde858e953ba36b7385a727875 X-Git-Newrev: c942c4d05c6aa29404002bfebb2babf0720a33e5 X-Git-Rev: c942c4d05c6aa29404002bfebb2babf0720a33e5 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. coheigea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cxf.git The following commit(s) were added to refs/heads/master by this push: new c942c4d CXF-7654 - Swagger 2 document doesn't contain Info/BasePath on Karaf c942c4d is described below commit c942c4d05c6aa29404002bfebb2babf0720a33e5 Author: Colm O hEigeartaigh AuthorDate: Wed Feb 21 11:47:23 2018 +0000 CXF-7654 - Swagger 2 document doesn't contain Info/BasePath on Karaf --- .../java/org/apache/cxf/jaxrs/swagger/Swagger2Customizer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Customizer.java b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Customizer.java index 8f75df7..a1d2882 100644 --- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Customizer.java +++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Customizer.java @@ -62,12 +62,15 @@ public class Swagger2Customizer { if (dynamicBasePath) { MessageContext ctx = createMessageContext(); String currentBasePath = StringUtils.substringBeforeLast(ctx.getHttpServletRequest().getRequestURI(), "/"); - if (!currentBasePath.equals(beanConfig.getBasePath())) { - data.setBasePath(currentBasePath); + data.setBasePath(currentBasePath); + if (data.getHost() == null) { data.setHost(beanConfig.getHost()); + } + if (data.getInfo() == null) { data.setInfo(beanConfig.getInfo()); } - if (beanConfig.getSwagger() != null + + if (beanConfig.getSwagger() != null && beanConfig.getSwagger().getSecurityDefinitions() != null && data.getSecurityDefinitions() == null) { data.setSecurityDefinitions(beanConfig.getSwagger().getSecurityDefinitions()); -- To stop receiving notification emails like this one, please contact coheigea@apache.org.