mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-19 18:00:47 +01:00
feat(CLI): did you mean for struct values
* functionality is cursor-aware, and fixes the actual string the user passed in. That way, it is made very clear how the suggested value is to be used. * it's a known weakness of the implementation that it operates on a flattened list of field names, and thus may make nonsensical suggestions. * added punctuation to all errors Fixes #67 [skip ci]
This commit is contained in:
@@ -82,6 +82,10 @@ def new_method_context(resource, method, c):
|
||||
return MethodContext(m, response_schema, params, request_value, media_params,
|
||||
required_props, optional_props, part_prop)
|
||||
|
||||
# Returns a string representing a string-vector of mangled names
|
||||
# fields is an iterator
|
||||
def field_vec(fields):
|
||||
return "vec![%s]" % ', '.join('"%s"' % mangle_subcommand(f) for f in fields)
|
||||
|
||||
def pretty(n):
|
||||
return ' '.join(s.capitalize() for s in mangle_subcommand(n).split('-'))
|
||||
|
||||
Reference in New Issue
Block a user