diff --git a/awscli/argprocess.py b/awscli/argprocess.py index 26bef03c1509..da3b623fb6a1 100644 --- a/awscli/argprocess.py +++ b/awscli/argprocess.py @@ -303,7 +303,7 @@ def _docs_special_key_value_parse(self, param): # should be skipped for this arg. return None else: - self._docs_key_value_parse(param) + return self._docs_key_value_parse(param) def _docs_key_value_parse(self, param): s = '%s ' % param.cli_name diff --git a/tests/unit/docs/test_help_output.py b/tests/unit/docs/test_help_output.py index b78eed8b2967..83c3768d32d2 100644 --- a/tests/unit/docs/test_help_output.py +++ b/tests/unit/docs/test_help_output.py @@ -230,6 +230,15 @@ def test_no_examples_for_structure_single_scalar(self): self.assert_not_contains('"Value": "string"') self.assert_not_contains('Value=string') + def test_example_for_single_structure_not_named_value(self): + # Verify that if a structure does match our special case + # (single element named "Value"), then we still document + # the example syntax. + self.driver.main(['s3api', 'restore-object', 'help']) + self.assert_contains('Days=value') + # Also should see the JSON syntax in the help output. + self.assert_contains('"Days": integer') + class TestJSONListScalarDocs(BaseAWSHelpOutputTest): def test_space_separated_list_docs(self):