[
https://issues.apache.org/jira/browse/CXF-7749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andriy Redko resolved CXF-7749.
-------------------------------
Resolution: Fixed
> OpenApi 3.0: Enable restriction of swagger definitions per CXF endpoint
> (based on the path)
> -------------------------------------------------------------------------------------------
>
> Key: CXF-7749
> URL: https://issues.apache.org/jira/browse/CXF-7749
> Project: CXF
> Issue Type: New Feature
> Affects Versions: 3.1.17
> Reporter: Bharanidharan Viswanathan
> Assignee: Andriy Redko
> Priority: Major
> Fix For: 3.3.0
>
>
> h2. What
> OpenApi 3.0 - enable restricting swagger definitions per CXF endpoint (based
> on the path)! For example, if there would two CXF endpoints ("/admin" &
> "/public") & then on each of them, only the specific swagger definitions
> should be visible.
> [~reta] FYI.
> h2. Suggested solution
> Since the OpenApi v3 does not use base path anymore, it is pretty hard to
> attach the OpenApiFeature to particular context path. However, we have
> another option, which is using Context Id. The idea is pretty simple:
> introduce a new property "useContextBasedConfig" which will hint
> OpenApiFeature to assign the unique ID to the context. In this case multiple
> OpenApiFeature instances (very likely assigned to a different context paths)
> would not conflict.
> The fix is ready ([https://github.com/reta/cxf/tree/CXF-7749]) but needs
> Swagger 2.0.6 (due to this issue
> [https://github.com/swagger-api/swagger-core/pull/2990).] Otherwise the
> OpenApiCustomizer does not work properly.
> h2. Documentation
> * [https://cwiki.apache.org/confluence/display/CXF20DOC/OpenApiFeature]
> *
> [https://cwiki.apache.org/confluence/display/CXF20DOC/OpenApiFeature#OpenApiFeature-OpenApiFeature-UsingMultipleServerEndpoints(3.3.0+)UsingMultipleServerEndpoints(3.3.0+)]
> h2. Notes
> I think due to dependency on Swagger 2.0.6, we may not be able to port it
> back to 3.2.x maintenance branch (since it also implies JAXB 2.3.0+ if I am
> not mistaken).
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)