mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2025-12-26 17:02:24 +01:00
Map 'any' JSON Schema type to json::Value instead of String
This commit is contained in:
committed by
Sebastian Thiel
parent
0548e4dc21
commit
11dc2ef170
@@ -104,7 +104,7 @@ class UtilsTest(unittest.TestCase):
|
||||
property_name = 'details'
|
||||
property_value = schemas[class_name]['properties'][property_name]
|
||||
rust_type = to_rust_type(schemas, class_name, property_name, property_value, allow_optionals=True)
|
||||
self.assertEqual(rust_type, 'Option<Vec<HashMap<String, String>>>')
|
||||
self.assertEqual(rust_type, 'Option<Vec<HashMap<String, json::Value>>>')
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -30,7 +30,7 @@ RUST_TYPE_MAP = {
|
||||
'double': Base("f64"),
|
||||
'float': Base("f32"),
|
||||
'int32': Base("i32"),
|
||||
'any': Base("String"), # TODO: Figure out how to handle it. It's 'interface' in Go ...
|
||||
'any': Base("json::Value"),
|
||||
'int64': Base("i64"),
|
||||
'uint64': Base("u64"),
|
||||
'array': Vec(None),
|
||||
|
||||
Reference in New Issue
Block a user