MCPcopy Create free account
hub / github.com/googleapis/google-api-python-client / prettyPrintSchema

Method prettyPrintSchema

googleapiclient/schema.py:147–158  ·  view source on GitHub ↗

Get pretty printed object prototype of schema. Args: schema: object, Parsed JSON schema. Returns: string, A string that contains a prototype object with comments that conforms to the given schema.

(self, schema)

Source from the content-addressed store, hash-verified

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.
149
150 Args:
151 schema: object, Parsed JSON schema.
152
153 Returns:
154 string, A string that contains a prototype object with
155 comments that conforms to the given schema.
156 """
157 # Return with trailing comma and newline removed.
158 return self._prettyPrintSchema(schema, dent=0)[:-2]
159
160 def get(self, name, default=None):
161 """Get deserialized JSON schema from the schema name.

Callers 14

createMethodFunction · 0.80
test_empty_edge_caseMethod · 0.80
test_simple_objectMethod · 0.80
test_stringMethod · 0.80
test_integerMethod · 0.80
test_numberMethod · 0.80
test_booleanMethod · 0.80
test_string_defaultMethod · 0.80
test_integer_defaultMethod · 0.80
test_number_defaultMethod · 0.80
test_boolean_defaultMethod · 0.80
test_nullMethod · 0.80

Calls 1

_prettyPrintSchemaMethod · 0.95

Tested by 13

test_empty_edge_caseMethod · 0.64
test_simple_objectMethod · 0.64
test_stringMethod · 0.64
test_integerMethod · 0.64
test_numberMethod · 0.64
test_booleanMethod · 0.64
test_string_defaultMethod · 0.64
test_integer_defaultMethod · 0.64
test_number_defaultMethod · 0.64
test_boolean_defaultMethod · 0.64
test_nullMethod · 0.64
test_anyMethod · 0.64