(OpenAPI): Incorrect response for Incidents Count

XMLWordPrintable

    • Type: Bug Report
    • Resolution: Fixed
    • Priority: L3 - Default
    • 7.16.0, 7.16.0-alpha4
    • Affects Version/s: None
    • Component/s: 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

              Assignee:
              Tassilo Weidner-Mühl
              Reporter:
              Stephen Russett
              Tassilo Weidner-Mühl Tassilo Weidner-Mühl
              Anton von Weltzien Anton von Weltzien
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: