Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-12054

Camunda Swagger spec 7.13.0 has wrong Tenant URLs

      Expected Behavior

      Downloading, opening and running the latest version of the swagger spec in OpenAPI tools such as Swagger UI or POSTMan should allow a user to make live calls to the engine REST API.

      Actual Outcome

      Because the swagger spec at v7.13.0 has errors in the URLs, a user cannot use OpenAPI tools such as Swagger UI or POSTMan to make live calls to certain endpoints.

      Bug affects Swagger generated APIClients as well.

      Steps to Reproduce

      1. Download the latest 7.13.0 community stand alone engine and start it on your localhost
      2. Download the latest 7.13.0 swagger jar, extract the swagger spec from it
      3. Open the Swagger Spec in Swagger UI or Swagger Editor
        Notice the wrong /tenant/{teant-id}/ instead of /tenant-id/{tenant-id}/ in the URLs

        This is the controller panel for Smart Panels app

            [CAM-12054] Camunda Swagger spec 7.13.0 has wrong Tenant URLs

            Paul Bors added a comment -

            Perhaps an easy unit test of the swagger spec would be to generate a Java API Client out of it using the Maven plugins from OpenAPI and then using Java Reflection to invoke each method to hit an instance of the engine REST API and make sure the URL exists. It would be okay to return a client error but not a 404.

            Paul Bors added a comment - Perhaps an easy unit test of the swagger spec would be to generate a Java API Client out of it using the Maven plugins from OpenAPI and then using Java Reflection to invoke each method to hit an instance of the engine REST API and make sure the URL exists. It would be okay to return a client error but not a 404.

            Hi paulbors,

            Thank you for raising this bug report.

            What is the problem?

            • We generate the endpoint paths from the folder structure of our Freemarker abstraction
            • The name of the folder tenant located under /process-definition/key/{key}/ should be tenant-id instead

            Do you want to change it and raise a pull request? You can find the mentioned folder on GitHub [1]

            Best,
            Tassilo

            [1] https://github.com/camunda/camunda-bpm-platform/tree/master/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/%7Bkey%7D

            Tassilo Weidner added a comment - Hi paulbors , Thank you for raising this bug report. What is the problem? We generate the endpoint paths from the folder structure of our Freemarker abstraction The name of the folder tenant located under /process-definition/key/{key}/ should be tenant-id instead Do you want to change it and raise a pull request? You can find the mentioned folder on GitHub [1] Best, Tassilo [1] https://github.com/camunda/camunda-bpm-platform/tree/master/engine-rest/engine-rest-openapi/src/main/templates/paths/process-definition/key/%7Bkey%7D

            Paul Bors added a comment -

            Thank you @tassilo.weidner

            I'll try to do it over the weekend. Is there a tutorial for developers on how to setup Camunda's community edition for localhost development so that way I can quickly get myself up and running? Or should just fork-n-import the project into my IntelliJ as a Maven module and go from there?

            Paul Bors added a comment - Thank you @tassilo.weidner I'll try to do it over the weekend. Is there a tutorial for developers on how to setup Camunda's community edition for localhost development so that way I can quickly get myself up and running? Or should just fork-n-import the project into my IntelliJ as a Maven module and go from there?

            Hi paulbors,

            just clone the repository https://github.com/camunda/camunda-bpm-platform/ and import the module located under /engine-rest/engine-rest-openapi into IntelliJ.

            You can find detailed documentation about our Open API abstraction here:
            https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest-openapi/README.md

            Does this answer your question?

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi paulbors , just clone the repository  https://github.com/camunda/camunda-bpm-platform/ and import the module located under /engine-rest/engine-rest-openapi  into IntelliJ. You can find detailed documentation about our Open API abstraction here: https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest-openapi/README.md Does this answer your question? Best, Tassilo

            Paul Bors added a comment -

            Thank you @Tassilo

            I opened PR #873 against master for 7.14-SNAPSHOT and it looked like there is only 1 folder that needed renaming in the templates for the URL. I take it since bug fixes are licensed versions, I can't back port this to the 7.13.x branch. That's something the Camunda team will have to do.

            I also notice there is a "/tenant-id/" In the REST API of the DMN engine. I did not see a similar project under engine-dmn thus I take it the community hasn't yet created a swagger spec for that.

            Feel free to review merge at your team's convenience.

            Paul Bors added a comment - Thank you @Tassilo I opened PR #873  against master for 7.14-SNAPSHOT and it looked like there is only 1 folder that needed renaming in the templates for the URL. I take it since bug fixes are licensed versions, I can't back port this to the 7.13.x branch. That's something the Camunda team will have to do. I also notice there is a " /tenant-id/ " In the REST API of the DMN engine. I did not see a similar project under engine-dmn thus I take it the community hasn't yet created a swagger spec for that. Feel free to review merge at your team's convenience.

            Hi paulbors,

            Thank you again for your contribution.

            I've just merged it with our master branch. I've also backported it to Camunda BPM 7.13.

            Best,
            Tassilo

            Tassilo Weidner added a comment - Hi paulbors , Thank you again for your contribution. I've just merged it with our master branch. I've also backported it to Camunda BPM 7.13. Best, Tassilo

              tassilo.weidner Tassilo Weidner
              paulbors Paul Bors
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: