Fix to_json_schema() call
The to_json_schema() method now has the 'required_fields' incorrectly placed outside of the 'data_key' dict. This patch moves it inside that dict. Change-Id: Id50a75bc27198576b615c4e76c046a53008d20bc Closes-Bug: #1608870
This commit is contained in:
parent
67ba3a0840
commit
0146734e7e
@ -360,9 +360,9 @@ class VersionedObject(object):
|
||||
data_key: {
|
||||
'type': 'object',
|
||||
'description': 'fields of %s' % (obj_name),
|
||||
'properties': field_schemas
|
||||
'properties': field_schemas,
|
||||
'required': required_fields
|
||||
},
|
||||
'required': required_fields
|
||||
},
|
||||
'required': [namespace_key, name_key, version_key, data_key]
|
||||
}
|
||||
|
@ -2094,8 +2094,8 @@ class TestSchemaGeneration(test.TestCase):
|
||||
'foo': {'type': ['fake']},
|
||||
'bar': {'type': ['fake', 'null']}
|
||||
},
|
||||
'required': ['bar', 'foo'],
|
||||
},
|
||||
'required': ['bar', 'foo']
|
||||
},
|
||||
'required': ['versioned_object.namespace', 'versioned_object.name',
|
||||
'versioned_object.version', 'versioned_object.data']
|
||||
|
Loading…
x
Reference in New Issue
Block a user