Revert "Support generic default values"

This feature inadvertently introduced a breaking change (#144)

This reverts commits: feb6c4b2fe
b38a55331b.
This commit is contained in:
Graham Esau 2022-05-17 18:17:17 +01:00
parent 1610294af4
commit d93bdc43e3
3 changed files with 1 additions and 27 deletions

View file

@ -56,15 +56,3 @@ struct NotSerialize;
fn schema_default_values() -> TestResult {
test_default_generated_schema::<MyStruct>("default")
}
#[allow(dead_code)]
#[derive(JsonSchema)]
struct StructWithGenericDefaults {
#[serde(default = "Vec::new")]
a_vec: Vec<String>,
}
#[test]
fn schema_with_generic_default_value() -> TestResult {
test_default_generated_schema::<StructWithGenericDefaults>("generic_default")
}

View file

@ -1,14 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "StructWithGenericDefaults",
"type": "object",
"properties": {
"a_vec": {
"default": [],
"type": "array",
"items": {
"type": "string"
}
}
}
}