Skip to content

Commit

Permalink
2.0: stricter validation of additionalProperties
Browse files Browse the repository at this point in the history
Following clarification of 'additionalProperties' for a schema by
@webron:
swagger-api/swagger-codegen#1318 (comment)

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).
  • Loading branch information
dolmen committed Oct 9, 2015
1 parent 5cf4bf0 commit fe12c0c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions schemas/v2.0/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -1588,4 +1590,4 @@
}
}
}
}
}

0 comments on commit fe12c0c

Please sign in to comment.