Constructor. Args: discovery: object, Deserialized discovery document from which we pull out the named schema.
(self, discovery)
| 72 | """Schemas for an API.""" |
| 73 | |
| 74 | def __init__(self, discovery): |
| 75 | """Constructor. |
| 76 | |
| 77 | Args: |
| 78 | discovery: object, Deserialized discovery document from which we pull |
| 79 | out the named schema. |
| 80 | """ |
| 81 | self.schemas = discovery.get("schemas", {}) |
| 82 | |
| 83 | # Cache of pretty printed schemas. |
| 84 | self.pretty = {} |
| 85 | |
| 86 | @util.positional(2) |
| 87 | def _prettyPrintByName(self, name, seen=None, dent=0): |