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
Depends-On: I279fba4099667d193609a31259057b897380d6f0
Change-Id: I96717506259c0d28500b8747369c47029b1dd9b6
This commit is contained in:
@@ -112,7 +112,8 @@ class TestUtils(testtools.TestCase):
|
||||
def schema_getter(_type='string', enum=False):
|
||||
prop = {
|
||||
'type': ['null', _type],
|
||||
'description': 'Test schema (READ-ONLY)',
|
||||
'readOnly': True,
|
||||
'description': 'Test schema',
|
||||
}
|
||||
|
||||
if enum:
|
||||
|
||||
Reference in New Issue
Block a user