diff options
author | Thomas Duval <thomas.duval@orange.com> | 2018-04-17 10:02:42 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2018-04-17 10:02:42 +0200 |
commit | 5f97343ea8fab5db3cf1584322a75d25d583406f (patch) | |
tree | 23f887e8bf16ed159c64d6962cfd560f1eba8119 /moon_manager/moon_manager/api/meta_rules.py | |
parent | aef6a3af1badef9e8de50f288537528af6af44af (diff) |
Update documentation to show which parameter is mandatory or not.
Change-Id: I903c0ec1329ca29fb9dd88644d067d6b6f6bd147
Diffstat (limited to 'moon_manager/moon_manager/api/meta_rules.py')
-rw-r--r-- | moon_manager/moon_manager/api/meta_rules.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/moon_manager/moon_manager/api/meta_rules.py b/moon_manager/moon_manager/api/meta_rules.py index d2cbf5d1..0728a447 100644 --- a/moon_manager/moon_manager/api/meta_rules.py +++ b/moon_manager/moon_manager/api/meta_rules.py @@ -62,14 +62,14 @@ class MetaRules(Resource): def post(self, meta_rule_id=None, user_id=None): """Add a meta rule - :param meta_rule_id: Meta rule ID + :param meta_rule_id: Meta rule ID (not used here) :param user_id: user ID who do the request :request body: post = { - "name": "name of the meta rule", - "subject_categories": ["subject_category_id1", + "name": "name of the meta rule (mandatory)", + "subject_categories": ["subject_category_id1 (mandatory)", "subject_category_id2"], - "object_categories": ["object_category_id1"], - "action_categories": ["action_category_id1"] + "object_categories": ["object_category_id1 (mandatory)"], + "action_categories": ["action_category_id1 (mandatory)"] } :return: { "meta_rules": { @@ -94,7 +94,7 @@ class MetaRules(Resource): return {"meta_rules": data} @check_auth - def patch(self, meta_rule_id=None, user_id=None): + def patch(self, meta_rule_id, user_id=None): """Update a meta rule :param meta_rule_id: Meta rule ID @@ -129,18 +129,11 @@ class MetaRules(Resource): return {"meta_rules": data} @check_auth - def delete(self, meta_rule_id=None, user_id=None): + def delete(self, meta_rule_id, user_id=None): """Delete a meta rule :param meta_rule_id: Meta rule ID :param user_id: user ID who do the request - :request body: delete = { - "name": "name of the meta rule", - "subject_categories": ["subject_category_id1", - "subject_category_id2"], - "object_categories": ["object_category_id1"], - "action_categories": ["action_category_id1"] - } :return: { "meta_rules": { "meta_rule_id1": { |