diff --git a/README.md b/README.md index 8128d22..324b26d 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,8 @@ println!("{}", serde_json::to_string_pretty(&schema).unwrap()); "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -97,7 +98,8 @@ println!("{}", serde_json::to_string_pretty(&schema).unwrap()); } } } - } + }, + "additionalProperties": false } ] } diff --git a/docs/_includes/examples/custom_settings.schema.json b/docs/_includes/examples/custom_settings.schema.json index 36d9f17..59939be 100644 --- a/docs/_includes/examples/custom_settings.schema.json +++ b/docs/_includes/examples/custom_settings.schema.json @@ -35,7 +35,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -58,7 +59,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/docs/_includes/examples/doc_comments.schema.json b/docs/_includes/examples/doc_comments.schema.json index 7cc468f..0f3405c 100644 --- a/docs/_includes/examples/doc_comments.schema.json +++ b/docs/_includes/examples/doc_comments.schema.json @@ -44,7 +44,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "description": "A struct-like enum variant which contains some floats", @@ -69,7 +70,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/docs/_includes/examples/main.schema.json b/docs/_includes/examples/main.schema.json index a658248..737bcbc 100644 --- a/docs/_includes/examples/main.schema.json +++ b/docs/_includes/examples/main.schema.json @@ -37,7 +37,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -60,7 +61,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/schemars/examples/custom_settings.schema.json b/schemars/examples/custom_settings.schema.json index 36d9f17..59939be 100644 --- a/schemars/examples/custom_settings.schema.json +++ b/schemars/examples/custom_settings.schema.json @@ -35,7 +35,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -58,7 +59,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/schemars/examples/doc_comments.schema.json b/schemars/examples/doc_comments.schema.json index 7cc468f..0f3405c 100644 --- a/schemars/examples/doc_comments.schema.json +++ b/schemars/examples/doc_comments.schema.json @@ -44,7 +44,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "description": "A struct-like enum variant which contains some floats", @@ -69,7 +70,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/schemars/examples/main.schema.json b/schemars/examples/main.schema.json index a658248..737bcbc 100644 --- a/schemars/examples/main.schema.json +++ b/schemars/examples/main.schema.json @@ -37,7 +37,8 @@ "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -60,7 +61,8 @@ } } } - } + }, + "additionalProperties": false } ] } diff --git a/schemars/src/lib.rs b/schemars/src/lib.rs index 907572b..a4372f8 100644 --- a/schemars/src/lib.rs +++ b/schemars/src/lib.rs @@ -69,7 +69,8 @@ println!("{}", serde_json::to_string_pretty(&schema).unwrap()); "StringNewType": { "type": "string" } - } + }, + "additionalProperties": false }, { "type": "object", @@ -92,7 +93,8 @@ println!("{}", serde_json::to_string_pretty(&schema).unwrap()); } } } - } + }, + "additionalProperties": false } ] }