MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / _prettyPrintSchema

Method _prettyPrintSchema

googleapiclient/schema.py:130–145  ·  view source on GitHub ↗

Get pretty printed object prototype of schema. Args: schema: object, Parsed JSON schema. seen: list of string, Names of schema already seen. Used to handle recursive definitions. Returns: string, A string that contains a prototype object wi

(self, schema, seen=None, dent=0)

Source from the content-addressed store, hash-verified

128
129 @util.positional(2)
130 def _prettyPrintSchema(self, schema, seen=None, dent=0):
131 """Get pretty printed object prototype of schema.
132
133 Args:
134 schema: object, Parsed JSON schema.
135 seen: list of string, Names of schema already seen. Used to handle
136 recursive definitions.
137
138 Returns:
139 string, A string that contains a prototype object with
140 comments that conforms to the given schema.
141 """
142 if seen is None:
143 seen = []
144
145 return _SchemaToStruct(schema, seen, dent=dent).to_str(self._prettyPrintByName)
146
147 def prettyPrintSchema(self, schema):
148 """Get pretty printed object prototype of schema.

Callers 1

prettyPrintSchemaMethod · 0.95

Calls 2

_SchemaToStructClass · 0.85
to_strMethod · 0.80

Tested by

no test coverage detected