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

MicroProfile OpenAPI and multiple deployments: conflicting root level ".tags" definitions appear in the final OpenAPI document with the same name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • 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. Run the tests

      • 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=MultipleWarsAffectingGlobalPropertiesAndReferencesTest#testConflictingTags
      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. Run the tests 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=MultipleWarsAffectingGlobalPropertiesAndReferencesTest#testConflictingTags
    • User Experience

      • Have a localServicesRouterDeployment.war, defining a root level tags element, e.g.:
        tags:
          # Tag definition with a description for documentation
          - name: examples
            description: Operations related to SP examples
        ...
        
      • Then, have a anotherLocalServicesRouterDeployment.war, defining a root level tags element, which include a tag with identical name but different description e.g.:
        tags:
          # Tag definition with a description for documentation
          - name: examples
            description: Operations related to LSR examples
        ...
        

      When deploying both the applications, the resulting OpenAPI document components element shows both the tag occurrences, with duplicated names:

      ---
      tags:
      - name: examples
        description: Operations related to LSR examples
      - name: examples
        description: Operations related to SP examples
      ...
      

      while the OpenAPI spec (see the tags element specification) states:
      Each tag name in the list MUST be unique.

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

                Created:
                Updated:
                Resolved: