summaryrefslogtreecommitdiffstats
path: root/makeapi
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2015-07-15 19:10:14 +0000
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commit77e27de147729be36d19c89e21d5aa319412dc67 (patch)
tree96f942194d96783281a21f3b2bb66e20418231b8 /makeapi
parentac2e9e84cf67b59488a07ffe932019ce3e23b41a (diff)
downloadfreeipa-77e27de147729be36d19c89e21d5aa319412dc67.tar.gz
freeipa-77e27de147729be36d19c89e21d5aa319412dc67.tar.xz
freeipa-77e27de147729be36d19c89e21d5aa319412dc67.zip
makeapi: optimize API.txt
Change Param formatting to: * always use quantified names rather than the `required` and `multivalue` kwargs, * ignore kwargs with default value, * ignore kwargs related to validation, as validation is now strictly server-side, * ignore the `attribute` and `primary_key` kwargs, as they are relevant only on object params, * ignore the `include` and `exclude` kwargs, as makeapi takes into account only params available in the 'cli' context, * ignore the unused `csv` kwarg. Format optional Output arguments as kwargs. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'makeapi')
-rwxr-xr-xmakeapi42
1 files changed, 32 insertions, 10 deletions
diff --git a/makeapi b/makeapi
index 39095bbd7..f20f11211 100755
--- a/makeapi
+++ b/makeapi
@@ -44,18 +44,40 @@ API_NO_FILE = 4
API_DOC_ERROR = 8
# attributes removed from Param.__kw dictionary
-PARAM_IGNORED_KW_ATTRIBUTES = ('label',
- 'doc',
- 'normalizer',
- 'default_from',
- 'hint',
- 'flags',
- 'sortorder',
- 'pattern_errmsg',)
+PARAM_IGNORED_KW_ATTRIBUTES = (
+ 'attribute',
+ 'csv',
+ 'default_from',
+ 'doc',
+ 'exclude',
+ 'exponential',
+ 'flags',
+ 'hint',
+ 'include',
+ 'label',
+ 'length',
+ 'maxlength',
+ 'maxvalue',
+ 'minlength',
+ 'minvalue',
+ 'noextrawhitespace',
+ 'normalizer',
+ 'numberclass',
+ 'only_absolute',
+ 'only_relative',
+ 'pattern',
+ 'pattern_errmsg',
+ 'precision',
+ 'primary_key',
+ 'query',
+ 'sortorder',
+)
# attributes removed from Output object
-OUTPUT_IGNORED_ATTRIBUTES = ('doc',
- 'flags',)
+OUTPUT_IGNORED_ATTRIBUTES = (
+ 'doc',
+ 'flags',
+)
def parse_options():
from optparse import OptionParser