[jboss-jira] [JBoss JIRA] (WFLY-13638) Permit multiples applications to the same server registry a MP openapi endpoint

Paul Ferraro (Jira) issues at jboss.org
Thu Jul 2 08:25:27 EDT 2020


    [ https://issues.redhat.com/browse/WFLY-13638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188257#comment-14188257 ] 

Paul Ferraro commented on WFLY-13638:
-------------------------------------

[~rhn-support-rhsilva] While I agree with you, i.e. exposing the /openapi endpoint at the context root instead of the host root makes a lot of sense for a traditional application server (as opposed to a single deployment MicroProfile container (e.g. Quarkus, ThornTail, etc.), this would unfortunately violate the MicroProfile OpenAPI specification.

Instead, the specification indicates that the OpenAPI endpoint should return documentation of all REST endpoints available from the host (including all contexts deployed to that host).  We don't yet have the ability to merge the OpenAPI model for each application, but that is currently the plan.

> Permit multiples applications to the same server registry a MP openapi endpoint
> -------------------------------------------------------------------------------
>
>                 Key: WFLY-13638
>                 URL: https://issues.redhat.com/browse/WFLY-13638
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: MP OpenAPI
>    Affects Versions: 20.0.0.Final
>            Reporter: Rhuan Rocha
>            Assignee: Paul Ferraro
>            Priority: Major
>
> In the Wildfly 20, if I deploy two applications in the same server just one registry an openapi endpoint. Look at this code:
> [https://github.com/wildfly/wildfly/blob/501c916b14663d328582a6625e9d492c2f8c0cfc/microprofile/openapi-smallrye/src/main/java/org/wildfly/extension/microprofile/openapi/deployment/OpenAPIDocumentProcessor.java#L71]
>  
> It makes sense as the endpoint is registered to http://{host}:\{port}/openpi, but I think it is better to registry it considering the context root. With this, we can registry multiples openapi per server. Thus the openapi endpoint can be registered to http://{host}:\{port}/\{context-root}/openapi. Looking at the code looks like it is possible to be done. If we have access to the information of context-root in [https://github.com/wildfly/wildfly/blob/501c916b14663d328582a6625e9d492c2f8c0cfc/microprofile/openapi-smallrye/src/main/java/org/wildfly/extension/microprofile/openapi/deployment/OpenAPIHttpHandlerServiceConfigurator.java#L68|https://github.com/wildfly/wildfly/blob/501c916b14663d328582a6625e9d492c2f8c0cfc/microprofile/openapi-smallrye/src/main/java/org/wildfly/extension/microprofile/openapi/deployment/OpenAPIHttpHandlerServiceConfigurator.java#L68,] , then we can start it considering the context-root. I think it will be a very common scenario of use and it will be very helpful to users. 



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list