Add 'options' as an explicit user schema validation
Add the options as an explicit part of the JSON schema for validation of user API calls (create/update). Change-Id: Ib69dd07801838823555ae1544533925a988b597d
This commit is contained in:
parent
1896d1ba0d
commit
9f4fbd88f8
@ -73,10 +73,15 @@ _user_properties = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO(notmorgan): Provide a mechanism for options to supply real jsonschema
|
||||||
|
# validation based upon the option object and the option validator(s)
|
||||||
user_create = {
|
user_create = {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'properties': _user_properties,
|
'properties': _user_properties,
|
||||||
'required': ['name'],
|
'required': ['name'],
|
||||||
|
'options': {
|
||||||
|
'type': 'object'
|
||||||
|
},
|
||||||
'additionalProperties': True
|
'additionalProperties': True
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +89,9 @@ user_update = {
|
|||||||
'type': 'object',
|
'type': 'object',
|
||||||
'properties': _user_properties,
|
'properties': _user_properties,
|
||||||
'minProperties': 1,
|
'minProperties': 1,
|
||||||
|
'options': {
|
||||||
|
'type': 'object'
|
||||||
|
},
|
||||||
'additionalProperties': True
|
'additionalProperties': True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user