class documentation
Convert schema to a prototype object.
| Method | __init__ |
Constructor. |
| Method | emit |
Add text as a line to the output. |
| Method | emit |
Add text to the output, but with no line terminator. |
| Method | emit |
Add text and comment to the output with line terminator. |
| Method | indent |
Increase indentation level. |
| Method | to |
Prototype object based on the schema, in Python code with comments. |
| Method | undent |
Decrease indentation level. |
| Instance Variable | dent |
Undocumented |
| Instance Variable | from |
Undocumented |
| Instance Variable | schema |
Undocumented |
| Instance Variable | seen |
Undocumented |
| Instance Variable | string |
Undocumented |
| Instance Variable | value |
Undocumented |
| Method | _to |
Prototype object based on the schema, in Python code with comments. |
Constructor.
| Parameters | |
| schema | object, Parsed JSON schema. |
| seen | list, List of names of schema already seen while parsing. Used to handle recursive definitions. |
| dent | int, Initial indentation depth. |
Add text and comment to the output with line terminator.
| Parameters | |
| text | string, Text to output. |
| comment | string, Python comment. |
Prototype object based on the schema, in Python code with comments.
| Parameters | |
| from | callable(name, seen), Callable that retrieves an object prototype for a schema with the given name. Seen is a list of schema names already seen as we recursively descend the schema definition. |
| Returns | |
| Prototype object based on the schema, in Python code with comments. The lines of the code will all be properly indented. | |