From 9f4fbd88f8b52e30ff6fe611ec031580311ffae2 Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Wed, 25 Jan 2017 21:05:03 -0800 Subject: [PATCH] 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 --- keystone/identity/schema.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/keystone/identity/schema.py b/keystone/identity/schema.py index dc124f7203..260af4778c 100644 --- a/keystone/identity/schema.py +++ b/keystone/identity/schema.py @@ -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 = { 'type': 'object', 'properties': _user_properties, 'required': ['name'], + 'options': { + 'type': 'object' + }, 'additionalProperties': True } @@ -84,6 +89,9 @@ user_update = { 'type': 'object', 'properties': _user_properties, 'minProperties': 1, + 'options': { + 'type': 'object' + }, 'additionalProperties': True }