json-schema-spec icon indicating copy to clipboard operation
json-schema-spec copied to clipboard

enum keyword was relaxed in draft5, metaschemas not updated

Open jeremyfiel opened this issue 7 months ago • 1 comments

@jviotti also pointed out the metaschemas diverge on this change.

> Actually it's a bit more subtle. While the spec indeed says SHOULD in some cases, the meta-schemas often still enforce this: > • Draft 4: https://json-schema.org/draft-04/schema#. It has minItems: 1 > • Draft 6: https://json-schema.org/draft-06/schema#. It has minItems: 1 > • Draft 7: https://json-schema.org/draft-07/schema#. It has minItems: 1 > • 2019-09: https://json-schema.org/draft/2019-09/meta/validation. Allows any number of items > • 2020-12: https://json-schema.org/draft/2020-12/meta/validation. Allows any number of items >

Slack Message

jeremyfiel avatar May 02 '25 22:05 jeremyfiel

This has already been addressed in the upcoming release. We require at least one item in enum.

gregsdennis avatar May 02 '25 22:05 gregsdennis