[jira] [Commented] (CXF-8144) OpenAPI v3 Feature: duplicated "getOpenApi" methods

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (CXF-8144) OpenAPI v3 Feature: duplicated "getOpenApi" methods

Freeman Yue Fang (Jira)

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

Andriy Redko commented on CXF-8144:
-----------------------------------

Thanks [~pioto] , I can confirm the issue, appears to manifest only when scanning is enabled.

[~rmannibucau] the issue is caused by the *Portable* feature refactorings, basically half of the *Portable*s are annotated with *@Provider* annotation, which in case of Spring-based scanning, leads to discovery and registration of both features, the actual one (fe *OpenApiFeature*) and its *Portable*  counterpart (fe *OpenApiFeature$Portable* since it is public and static). I believe that *@Provider* annotation should be removed from all *Portable*s and just kept on the actual features, it should fix this regression. Wdyt, makes sense to you? Thanks!

Best Regards,
    Andriy Redko

> OpenAPI v3 Feature: duplicated "getOpenApi" methods
> ---------------------------------------------------
>
>                 Key: CXF-8144
>                 URL: https://issues.apache.org/jira/browse/CXF-8144
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.3.3, 3.3.4
>            Reporter: Mike Kelly
>            Assignee: Andriy Redko
>            Priority: Minor
>
> Any calls to the OpenAPI documentation, as provided by the {{cxf-rt-rs-service-description-openapi-v3}} artifact, cause this warning to be logged:
> {noformat}
> 2019-11-05 16:48:43,551 [http-nio-8080-exec-9] WARN  org.apache.cxf.jaxrs.utils.JAXRSUtils  - Both org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService#getResource and org.apache.cxf.jaxrs.swagger.ui.SwaggerUiService#getResource are equal candidates for handling the current request which can lead to unpredictable results
> {noformat}
> If you're loading or refreshing the API documentation, you'll see a whole lot of these warnings get logged.
> This seems like something that is likely a spurious message, or a design flaw in the Apache CXF modules?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)