← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1521581] [NEW] v2 - "readOnly" key should be used in schemas

 

Public bug reported:

Currently, the way object properties are labelled read-only is through
the description, like so:

"status": {
            "enum": [
                "queued",
                "saving",
                "active",
                "killed",
                "deleted",
                "pending_delete",
                "deactivated"
            ],
            "type": "string",
            "description": "Status of the image (READ-ONLY)"
        }


This is not the recommended way to indicate read-only status. The "readOnly" property should be used instead:

"status": {
            "enum": [
                "queued",
                "saving",
                "active",
                "killed",
                "deleted",
                "pending_delete",
                "deactivated"
            ],
            "type": "string",
            "readOnly": true,
            "description": "Status of the image"
        }


Further link for reference: http://json-schema.org/latest/json-schema-hypermedia.html#anchor15

** Affects: glance
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1521581

Title:
  v2 - "readOnly" key should be used in schemas

Status in Glance:
  New

Bug description:
  Currently, the way object properties are labelled read-only is through
  the description, like so:

  "status": {
              "enum": [
                  "queued",
                  "saving",
                  "active",
                  "killed",
                  "deleted",
                  "pending_delete",
                  "deactivated"
              ],
              "type": "string",
              "description": "Status of the image (READ-ONLY)"
          }

  
  This is not the recommended way to indicate read-only status. The "readOnly" property should be used instead:

  "status": {
              "enum": [
                  "queued",
                  "saving",
                  "active",
                  "killed",
                  "deleted",
                  "pending_delete",
                  "deactivated"
              ],
              "type": "string",
              "readOnly": true,
              "description": "Status of the image"
          }

  
  Further link for reference: http://json-schema.org/latest/json-schema-hypermedia.html#anchor15

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1521581/+subscriptions


Follow ups