Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-692

MicroProfile OpenAPI and multiple deployments: duplicate server records

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • MP OpenAPI
    • None
    • Hide

      1. Build the WildFly snapshot based on the feature branch:

      • git clone git@github.com:pferraro/wildfly.git
      • cd wildfly
      • git checkout openapi
      • mvn clean install -DskipTests

      2. Automated test:

      • git clone git@github.com:fabiobrz/eap-microprofile-test-suite.git
      • cd eap-microprofile-test-suite
      • git checkout issue-344.mp-openapi-multi-war
      • mvn clean verify -pl microprofile-open-api -am -Djboss.dist=<WILDFLY_SNAPSHOT_BUILD_DIRECTORY> -Dtest=MultipleLocalServiceRouterWarsAffectingGlobalPropertiesTest#testGlobalServerListIsCorrect

      3. Manual reproducer:

      • deploy application1.war, which has some OpenAPI annotated REST API
      • deploy application2.war, which has some OpenAPI annotated REST API
      • set mp.openapi.extensions.servers.relative=false via the CLI, e.g.:
        /subsystem=microprofile-config-smallrye/config-source=props:add(properties={mp.openapi.extensions.servers.relative=false})
        
      • fetch the generated OpenAPI documentation via http://localhost:8080/openapi
      • look for the servers property, which should list duplicated entries, e.g.:
        servers:
        - url: http://localhost:8080
        - url: https://localhost:8443
        - url: http://localhost:8080
        - url: https://localhost:8443
        
      Show
      1. Build the WildFly snapshot based on the feature branch: git clone git@github.com:pferraro/wildfly.git cd wildfly git checkout openapi mvn clean install -DskipTests 2. Automated test : git clone git@github.com:fabiobrz/eap-microprofile-test-suite.git cd eap-microprofile-test-suite git checkout issue-344.mp-openapi-multi-war mvn clean verify -pl microprofile-open-api -am -Djboss.dist=<WILDFLY_SNAPSHOT_BUILD_DIRECTORY> -Dtest=MultipleLocalServiceRouterWarsAffectingGlobalPropertiesTest#testGlobalServerListIsCorrect 3. Manual reproducer : deploy application1.war, which has some OpenAPI annotated REST API deploy application2.war, which has some OpenAPI annotated REST API set mp.openapi.extensions.servers.relative=false via the CLI, e.g.: /subsystem=microprofile-config-smallrye/config-source=props:add(properties={mp.openapi.extensions.servers.relative= false }) fetch the generated OpenAPI documentation via http://localhost:8080/openapi look for the servers property, which should list duplicated entries, e.g.: servers: - url: http: //localhost:8080 - url: https: //localhost:8443 - url: http: //localhost:8080 - url: https: //localhost:8443
    • User Experience

      When multiple deployments contribute to the generation of the same server/virtual host OpenAPI documentation, and mp.openapi.extensions.servers.relative is set to false, then duplicate absolute server URLs are generated.

              pferraro@redhat.com Paul Ferraro
              fburzigo@redhat.com Fabio Burzigotti
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: