Skip to content

Add support for minProperties, maxProperties #46

Closed
@Tatsh

Description

@Tatsh

minProperties and maxProperties are for objects and are mentioned here: https://github.com/json-schema/json-schema/wiki/ChangeLog
http://json-schema.org/latest/json-schema-validation.html#anchor54

This looks like it would stop this from working (which is good in some cases):

Schema:

{
  "schema": "blah-url",
  "type": "object",
  "properties": {
    "a": {
      "type": "boolean"
    }
  },
  "maxProperties": 1
}

input JSON:

{"a": true, "junk_field": 2}

Error would be on the junk_field being an extra and maxProperties being exceeded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions