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

(OpenAPI): Incorrect response for Incidents Count

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.16.0, 7.16.0-alpha4
    • None
    • None
    • None

      Environment (Required on creation):

      Camunda BPM Platform 7.16.0-alpha3

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      The Open API endpoint getIncidentsCount defines that the response is of type array.

      Steps to reproduce (Required on creation):

      Check the definition [1] of the Open API endpoint getIncidentsCount.

      Observed Behavior (Required on creation):

      The response is defined as an array.

      Expected behavior (Required on creation):

      The response should not be defined as an array.

      Root Cause (Required on prioritization):

      In [1] array = true is defined.

      Solution Ideas (Optional):

      Remove array = true from [1].

      Hints (Optional):

      [1] https://github.com/camunda/camunda-bpm-platform/blob/master/engine-rest/engine-rest-openapi/src/main/templates/paths/incident/count/get.ftl#L20

      Original Description

      as per the docs, the response should be the standard:

      { "count": someNumber}

       

      but as of 7.16 the response defined in OpenAPI spec as:

      ```

      "responses": {
      "200": {
      "content": {
      "application/json": {
      "schema": {
      "type": "array",
      "items":

      { "$ref": "#/components/schemas/CountResultDto" }

      },
      "examples": {
      "example-1": {
      "summary": "GET `/incident/count?processInstanceId\u003daProcInstId`",
      "value": [

      { "count": 2 }

      ]
      }
      }
      }
      },
      "description": "Request successful."
      }

      ```

       

       

      It should not be an array.

        This is the controller panel for Smart Panels app

              tassilo.weidner Tassilo Weidner
              StephenOTT Stephen Russett
              Tassilo Weidner Tassilo Weidner
              Anton von Weltzien Anton von Weltzien
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: