(self, doc, argument_model, stack)
| 544 | return f'{argument_model.type_name}' |
| 545 | |
| 546 | def _json_example(self, doc, argument_model, stack): |
| 547 | if argument_model.name in stack: |
| 548 | # Document the recursion once, otherwise just |
| 549 | # note the fact that it's recursive and return. |
| 550 | if stack.count(argument_model.name) > 1: |
| 551 | if argument_model.type_name == 'structure': |
| 552 | doc.write('{ ... recursive ... }') |
| 553 | return |
| 554 | stack.append(argument_model.name) |
| 555 | try: |
| 556 | self._do_json_example(doc, argument_model, stack) |
| 557 | finally: |
| 558 | stack.pop() |
| 559 | |
| 560 | def _do_json_example(self, doc, argument_model, stack): |
| 561 | if argument_model.type_name == 'list': |
no test coverage detected