[
https://issues.apache.org/jira/browse/CXF-9155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18017721#comment-18017721
]
Andriy Redko commented on CXF-9155:
-----------------------------------
[~jill] please use annotation for that, as per Swagger OpenAPI recommendations
[1]. The OpenAPICustomer is used only when the list of servers is not known
ahead of time, in this case you should set dynamicBasePath to true:
customizer.setDynamicBasePath(true)
[1] https://github.com/swagger-api/swagger-core/issues/4231
> 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, image-2025-08-19-22-11-46-327.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)