mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-24 04:01:11 +01:00
feat(CLI): repeated required args
* Seem to work for docopt, mkdocs and code itself * mkdocs now show type of required params * some code which deals with converting elements to their target types is totally untested right now. Related to #77
This commit is contained in:
@@ -121,6 +121,11 @@ def actual_json_type(name, type):
|
||||
return 'int64'
|
||||
return type
|
||||
|
||||
# return a string representing property `p` suitable for docopt argument parsing
|
||||
def to_docopt_arg(p):
|
||||
return '<%s>%s' % (mangle_subcommand(p.name), p.get('repeated', False) and '...' or '')
|
||||
|
||||
|
||||
# Return schema' with fields dict: { 'field1' : SchemaField(...), 'SubSchema': schema' }
|
||||
def to_cli_schema(c, schema):
|
||||
res = deepcopy(schema)
|
||||
|
||||
Reference in New Issue
Block a user