MCPcopy Index your code
hub / github.com/aws/aws-cli / _json_example_value_name

Method _json_example_value_name

awscli/clidocs.py:530–544  ·  view source on GitHub ↗
(
        self, argument_model, include_enum_values=True
    )

Source from the content-addressed store, hash-verified

528 )
529
530 def _json_example_value_name(
531 self, argument_model, include_enum_values=True
532 ):
533 # If include_enum_values is True, then the valid enum values
534 # are included as the sample JSON value.
535 if isinstance(argument_model, StringShape):
536 if argument_model.enum and include_enum_values:
537 choices = argument_model.enum
538 return '|'.join([f'"{c}"' for c in choices])
539 else:
540 return '"string"'
541 elif argument_model.type_name == 'boolean':
542 return 'true|false'
543 else:
544 return f'{argument_model.type_name}'
545
546 def _json_example(self, doc, argument_model, stack):
547 if argument_model.name in stack:

Callers 3

_do_json_exampleMethod · 0.95
doc_option_exampleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected