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

Rhuan Rocha (Jira) issues at jboss.org
Wed Jul 1 18:13:34 EDT 2020


     [ https://issues.redhat.com/browse/WFLY-13638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rhuan Rocha updated WFLY-13638:
-------------------------------
    Description: 
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 in considering the context-root. I think it will be a very common scenario of use and it will be very helpful to users. 

  was:
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 in considering the context-root. I think it will be a very common scenario of use and it will be very helpful to users. 



> 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 in 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