From a701a66eac3645e63f6389dbcc02fdb98c68f219 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Fri, 7 Feb 2020 15:47:34 +0200 Subject: [PATCH] Expose information about the primary key parameter to schema Related: https://pagure.io/freeipa/issue/8187 Signed-off-by: Alexander Bokovoy --- ipaserver/plugins/schema.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index 8ac3075e4..0c21c8c3a 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -483,6 +483,7 @@ class BaseParamMethod(Method): label=parent_key.label, required=True, query=True, + primary_key=True, ) for arg in super(BaseParamMethod, self).get_args(): @@ -574,6 +575,8 @@ class param(BaseParam): elif param.type is not None: obj['type'] = unicode(param.type.__name__) + if param.primary_key: + obj['primary_key'] = True if not param.required: obj['required'] = False if param.multivalue: -- 2.24.1