"InlineCommentProperties" V2 API swagger / OpenAPI definition has deprecated kebab-case properties that create duplicates when converted to camelCase.

XMLWordPrintable

      Issue Summary

      This is reproducible on Data Center: (no)

      "InlineCommentProperties" V2 API swagger / OpenAPI definition has deprecated kebab-case properties that create duplicates when converted to camelCase.

      We can see the definition like this. We see here the properties inlineMarkerRef, inlineOriginalSelection and deprecated properties inline-marker-ref, inline-original-selection.

      curl --location https://developer.atlassian.com/cloud/confluence/openapi-v2.v3.json 2>/dev/null \
      | jq '.components.schemas.InlineCommentProperties'
      {
        "type": "object",
        "properties": {
          "inlineMarkerRef": {
            "type": "string",
            "description": "Property value used to reference the highlighted element in DOM."
          },
          "inlineOriginalSelection": {
            "type": "string",
            "description": "Text that is highlighted."
          },
          "inline-marker-ref": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated, use `inlineMarkerRef` instead."
          },
          "inline-original-selection": {
            "type": "string",
            "deprecated": true,
            "description": "Deprecated, use `inlineOriginalSelection` instead."
          }
        }
      }
      

      Steps to Reproduce

      1. Make the above call to check the OpenAPI definition of InlineCommentProperties

      Expected Results

      deprecated properties, when converted to camelCase, shouldn't create duplicates of existing properties.

      Actual Results

      InlineCommentProperties contains deprecated properties using kebab-case. Client code generator tools like NSwage converts these to camelCase, causing to have duplicated properties.

      • inline-marker-ref becomes inlineMarkerRef
      • inline-original-selection becomes inlineOriginalSelection

      Workaround

      The swagger / openAPI definition file cannot be used as is. Has to be modified manually to remove the deprecated properties first.

              Assignee:
              Wing Sze Ng
              Reporter:
              Nashid Farhad (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: