Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-2964

API 2.0: No way to identify read-only fields in Swagger

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.93
    • 10.89, 10.90
    • REST API
    • 1
    • Severity 3 - Minor
    • No

      Issue Summary

      API 2.0 users often face an issue where an update is not reflected because they are trying to modify/update a read-only field. This happens because there is currently no way for the users to identify these read-only fields in Swagger.

      Steps to Reproduce

      Note: Nothing to reproduce actually but to provide context.

      1. Send a PATCH request to modify the "isRecycled" field in the Capability work item.

      Expected Results

      Needs further discussion with PM.

      • isRecycled field is one of the read-only fields and cannot be modified via API.
      • We need to mark the readOnly fields in Swagger schemas.
      • An adequate error message & corresponding error code should be returned once a PUT or PATCH call is made towards such a read-only field

      Actual Results

      The actual result is actually expected. However, this is confusing users because there is no indication that "isRecycled" is a read-only field in Swagger and can't be modified.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            ronyshchuk@atlassian.com Roman
            fd18f17e9ccb align-connector-bot
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: