[
https://issues.apache.org/jira/browse/CXF-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014903#comment-18014903
]
Zhiying Yan commented on CXF-9155:
----------------------------------
[~reta],
Thank you for your attention to this matter.
For security reasons, the design to disable the queryConfigEnabled is indeed
very necessary. However, during my testing, it appears that the implementation
may not be functioning as intended.
For instance, in the sample code available at
https://github.com/apache/cxf/blob/c7277e283d011ec97ad2fb45e38dbc0e9722b0cf/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java#L71,
the openapi.json url is specified in the SwaggerUiConfig. Yet, the Swagger UI
still defaults to displaying the PetStore example. Interestingly, it only works
as expected after I set .queryConfigEnabled(false).
I kindly ask if you could look into this further to ensure the design is
correctly implemented. Thank you for your understanding and assistance.
Best regards,
Zhiying Yan
> OpenApiFeature can not set Server or SwaggerUiConfig.url
> --------------------------------------------------------
>
> Key: CXF-9155
> URL: https://issues.apache.org/jira/browse/CXF-9155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 4.1.0
> Reporter: Zhiying Yan
> Assignee: Freeman Yue Fang
> Priority: Minor
> Attachments: Petstore.png, cxf-openapifeature-test.zip,
> explore-url.png, server-in-swagger-ui.png
>
>
> I have _JAXRSServerFactoryBean_ and
> _setAddress("http://0.0.0.0:8080/services");_
> I'd like to customize the execute server in swagger-ui as _/services_, but
> this is not working as expected.
> Also the following section does not work.
> {code:java}
> openApiFeature.setSwaggerUiConfig(new
> org.apache.cxf.jaxrs.swagger.ui.SwaggerUiConfig()
>
> .url("/api/hello/api-docs?url=/services/api/hello/openapi.json"));
> {code}
> Please help to check!
> Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)