Lines Matching +full:- +full:- +full:name +full:- +full:pretty
7 # http://www.apache.org/licenses/LICENSE-2.0
18 deserialized JSON objects, or pretty print them as prototype objects that
82 # Cache of pretty printed schemas.
83 self.pretty = {}
86 def _prettyPrintByName(self, name, seen=None, dent=0): argument
87 """Get pretty printed object prototype from the schema name.
90 name: string, Name of schema in the discovery document.
101 if name in seen:
103 return "# Object with schema name: %s" % name
104 seen.append(name)
106 if name not in self.pretty:
107 self.pretty[name] = _SchemaToStruct(
108 self.schemas[name], seen, dent=dent
113 return self.pretty[name]
115 def prettyPrintByName(self, name): argument
116 """Get pretty printed object prototype from the schema name.
119 name: string, Name of schema in the discovery document.
126 return self._prettyPrintByName(name, seen=[], dent=0)[:-2]
130 """Get pretty printed object prototype of schema.
147 """Get pretty printed object prototype of schema.
157 return self._prettyPrintSchema(schema, dent=0)[:-2]
159 def get(self, name, default=None): argument
160 """Get deserialized JSON schema from the schema name.
163 name: string, Schema name.
164 default: object, return value if name not found.
166 return self.schemas.get(name, default)
195 # the given name.
239 self.dent -= 1
307 from_cache: callable(name, seen), Callable that retrieves an object
308 prototype for a schema with the given name. Seen is a list of schema