--- source: crates/schematic/tests/defaults_test.rs expression: "std::fs::read_to_string(file).unwrap()" --- { "$schema": "http://json-schema.org/draft-07/schema#", "title": "NestedDefaults", "type": "object", "required": [ "nested", "nestedBoxed", "nestedMap", "nestedMapBoxed", "nestedMapOptBoxed", "nestedOpt", "nestedOptBoxed", "nestedVec", "nestedVecBoxed", "nestedVecOptBoxed" ], "properties": { "nested": { "allOf": [ { "$ref": "#/definitions/NativeDefaults" } ] }, "nestedBoxed": { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "nestedMap": { "type": "object", "additionalProperties": { "$ref": "#/definitions/NativeDefaults" }, "propertyNames": { "type": "string" } }, "nestedMapBoxed": { "type": "object", "additionalProperties": { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "propertyNames": { "type": "string" } }, "nestedMapOptBoxed": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, { "type": "null" } ] }, "propertyNames": { "type": "string" } }, "nestedOpt": { "anyOf": [ { "$ref": "#/definitions/NativeDefaults" }, { "type": "null" } ] }, "nestedOptBoxed": { "anyOf": [ { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, { "type": "null" } ] }, "nestedVec": { "type": "array", "items": { "$ref": "#/definitions/NativeDefaults" } }, "nestedVecBoxed": { "type": "array", "items": { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } }, "nestedVecOptBoxed": { "type": "array", "items": { "anyOf": [ { "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, { "type": "null" } ] } } }, "additionalProperties": false, "definitions": { "ContextDefaults": { "title": "ContextDefaults", "type": "object", "properties": { "count": { "type": "number" }, "path": { "type": "string", "format": "path" } }, "additionalProperties": false }, "CustomDefaults": { "title": "CustomDefaults", "type": "object", "properties": { "boolean": { "default": true, "type": "boolean" }, "float": { "default": 1.32, "type": "number" }, "number": { "default": 123, "type": "number" }, "string": { "default": "foo", "type": "string" }, "vector": { "type": "array", "items": { "type": "number" } } }, "additionalProperties": false }, "NativeDefaults": { "title": "NativeDefaults", "type": "object", "required": [ "boolean", "boxed", "float32", "float64", "number", "string", "vector" ], "properties": { "boolean": { "type": "boolean" }, "boxed": { "type": "string" }, "float32": { "type": "number" }, "float64": { "type": "number" }, "number": { "type": "number" }, "string": { "type": "string" }, "vector": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false }, "ReqOptDefaults": { "title": "ReqOptDefaults", "type": "object", "required": [ "optional", "required" ], "properties": { "optional": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "required": { "type": "number" }, "requiredWithDefault": { "default": 123, "type": "number" } }, "additionalProperties": false } } }