From fe12c0cf76e06931d58f45c62425e3d5093d2fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Mengu=C3=A9?= Date: Fri, 9 Oct 2015 13:53:54 +0200 Subject: [PATCH] 2.0: stricter validation of additionalProperties Following clarification of 'additionalProperties' for a schema by @webron: https://github.com/swagger-api/swagger-codegen/issues/1318#issuecomment-146302879 We now accept only `false` or a schema for `additionalProperties`. `false` is the new default for `additionalProperties` (instead of `{}` which means "anything is accepted" in JSON Schema). --- schemas/v2.0/schema.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/schemas/v2.0/schema.json b/schemas/v2.0/schema.json index e63aef6334..ea750ae288 100644 --- a/schemas/v2.0/schema.json +++ b/schemas/v2.0/schema.json @@ -991,10 +991,12 @@ "$ref": "#/definitions/schema" }, { - "type": "boolean" + "description": "false", + "type": "boolean", + "enum": [ false ] } ], - "default": {} + "default": false }, "type": { "$ref": "http://json-schema.org/draft-04/schema#/properties/type" @@ -1588,4 +1590,4 @@ } } } -} \ No newline at end of file +}