(
self, section, value, comments, path, shape, top_level=False
)
| 99 | self._document_str(section, value, path) |
| 100 | |
| 101 | def _document_dict( |
| 102 | self, section, value, comments, path, shape, top_level=False |
| 103 | ): |
| 104 | dict_section = section.add_new_section('dict-value') |
| 105 | self._start_nested_value(dict_section, '{') |
| 106 | for key, val in value.items(): |
| 107 | path.append(f'.{key}') |
| 108 | item_section = dict_section.add_new_section(key) |
| 109 | item_section.style.new_line() |
| 110 | item_comment = self._get_comment(path, comments) |
| 111 | if item_comment: |
| 112 | item_section.write(item_comment) |
| 113 | item_section.style.new_line() |
| 114 | item_section.write(f"'{key}': ") |
| 115 | |
| 116 | # Shape could be none if there is no output besides ResponseMetadata |
| 117 | item_shape = None |
| 118 | if shape: |
| 119 | if shape.type_name == 'structure': |
| 120 | item_shape = shape.members.get(key) |
| 121 | elif shape.type_name == 'map': |
| 122 | item_shape = shape.value |
| 123 | self._document(item_section, val, comments, path, item_shape) |
| 124 | path.pop() |
| 125 | dict_section_end = dict_section.add_new_section('ending-brace') |
| 126 | self._end_nested_value(dict_section_end, '}') |
| 127 | if not top_level: |
| 128 | dict_section_end.write(',') |
| 129 | |
| 130 | def _document_params(self, section, value, comments, path, shape): |
| 131 | param_section = section.add_new_section('param-values') |
no test coverage detected