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

Using mp.openapi.scan.disable=true on subsequent deployment causes OpenAPI generation issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • MP OpenAPI
    • None
    • Hide

      The issue can be reproduced following the steps:

      • clone the EAP MicroProfile TS fork [1] and executing the following command:

      $ mvn clean verify -pl microprofile-open-api -Djboss.home=<FEATURE_BRANCH_DIST_JBOSS_HOME> -Pmp-open-api -Dtest=MicroprofileConfigIntegrationTests -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"

      • remove the @Ignore clause from last 3 tests in MicroprofileConfigIntegrationTests.java
      • place a breakpoint at one of the tests first line
      • when the breakpoint is hit, inspect generated OpenAPI doc at `http://localhost:8080/openapi`
      • check test results, 2 or 3 related tests should be failing

      Used feature branch is: https://github.com/pferraro/wildfly/tree/WFLY-12313

      [1]
      https://github.com/fabiobrz/eap-microprofile-test-suite/tree/integration-mp-config

      Show
      The issue can be reproduced following the steps: clone the EAP MicroProfile TS fork [1] and executing the following command: $ mvn clean verify -pl microprofile-open-api -Djboss.home=<FEATURE_BRANCH_DIST_JBOSS_HOME> -Pmp-open-api -Dtest=MicroprofileConfigIntegrationTests -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE" remove the @Ignore clause from last 3 tests in MicroprofileConfigIntegrationTests.java place a breakpoint at one of the tests first line when the breakpoint is hit, inspect generated OpenAPI doc at ` http://localhost:8080/openapi ` check test results, 2 or 3 related tests should be failing Used feature branch is: https://github.com/pferraro/wildfly/tree/WFLY-12313 [1] https://github.com/fabiobrz/eap-microprofile-test-suite/tree/integration-mp-config

      Complex scenario with 4 subsequent deployments.
      The last one adds the `mp.openapi.scan.disable=true` MP Config core property - consequently no `mp.openapi.extensions.path` MP Config vendor extension property is defined.
      This causes the server to behave in non-deterministic way for generation of OpenAPI document at standard `/openapi` URL.
      "Non-deterministic" means that - when the test is executed several times - the generated document contains elements either from first or second deployments (third one is not registering the endpoint and is skipped as expected).

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

                Created:
                Updated:
                Resolved: