1 Comment
author

The kind folks in the JSON Schema community pointed out a couple things I should share:

When using OpenAPI, the `unevaluatedProperties` feature described in this post is only available with OpenAPI 3.1 (which uses JSON Schema 2020-12 by default).

Also, the behavior of `unevaluatedProperties` and `additionalProperties` are also affected by the presence of the `patternProperties` keyword.

Also, the JSON Schema team hold that ajv is non-compliant by having the strict mode enabled by default. You can turn that off with --strict=false to be more compliant.

One also needs to use the --spec=draft2020 option with the ajv CLI when using JSON Schemas that use these later JSON Schema drafts.

Expand full comment