Add types for request and reponse parameters
(properties, is_optional)
| 87 | |
| 88 | |
| 89 | def output_type(properties, is_optional): |
| 90 | """Add types for request and reponse parameters""" |
| 91 | typename = 'one of' if 'oneOf' in properties else esc_underscores(properties.get('type', 'any')) |
| 92 | if typename == 'array': |
| 93 | if 'items' in properties and 'type' in properties['items']: |
| 94 | typename += ' of {}s'.format(esc_underscores(properties['items']['type'])) |
| 95 | if is_optional: |
| 96 | typename += ', optional' |
| 97 | output(' ({})'.format(esc_underscores(typename))) |
| 98 | |
| 99 | |
| 100 | def output_range(properties): |
no test coverage detected