yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #45854
[Bug 1521581] Re: v2 - "readOnly" key should be used in schemas
Reviewed: https://review.openstack.org/267972
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=4fc9d7df5e1dc1f4d430871857317fa7cced7e68
Submitter: Jenkins
Branch: master
commit 4fc9d7df5e1dc1f4d430871857317fa7cced7e68
Author: zwei <leidong@xxxxxxxxxxxxxxx>
Date: Fri Jan 15 14:52:14 2016 +0800
v2 - "readOnly" key should be used in schemas
If it has a value of boolean true,
this keyword indicates that the instance property SHOULD NOT be changed,
and attempts by a user agent to modify the value of this property are expected to be rejected by a server.
The value of this keyword MUST be a boolean.
The default value is false.
Further link for reference: http://json-schema.org/latest/json-schema-hypermedia.html#anchor15
Closes-Bug: #1521581
Change-Id: I279fba4099667d193609a31259057b897380d6f0
** Changed in: glance
Status: In Progress => Fix Released
--
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:
Fix Released
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
References