You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2022/04/10 14:39:00 UTC

[jira] [Commented] (CXF-8685) cannot access https in swagger UI with OpenApiFeature

    [ https://issues.apache.org/jira/browse/CXF-8685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17520179#comment-17520179 ] 

Andriy Redko commented on CXF-8685:
-----------------------------------

Hi [~letrthang@gmail.com] , the *OpenApiFeature* has the ability to detect the correct server URL (including protocol) at runtime, using {*}OpenApiCustomizer{*}. I don't know how you configure *OpenApiFeature* in your application, but generally you need to:
{noformat}
final OpenApiCustomizer customizer = new OpenApiCustomizer();
customizer.setDynamicBasePath(true);
       
final OpenApiFeature feature = ...;
feature.setCustomizer(customizer);
  {noformat}
The *servers* list is going to be generated on the fly. Hope it helps.

 

> cannot access https in swagger UI with OpenApiFeature
> -----------------------------------------------------
>
>                 Key: CXF-8685
>                 URL: https://issues.apache.org/jira/browse/CXF-8685
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Services
>    Affects Versions: 3.3.13
>            Reporter: Thang Le
>            Priority: Critical
>              Labels: OpenApiFeature, openapi
>
> In CXF {*}OpenApiFeature ({*}https://cxf.apache.org/docs/openapifeature.html). We need to allow to set server to '/' to fix https cannot set in Swagger UI.
>  
> Reference issue:
> [https://github.com/springdoc/springdoc-openapi/issues/726]
> https://stackoverflow.com/questions/70843940/springdoc-openapi-ui-how-do-i-set-the-request-to-https
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)