Support for unevaluatedProperties in OAS 3.1+? – JavaScript OpenAPI-Specification

The latest (draft 2020-12) version of JSON Schema supports the unevaluatedProperties vocabulary (see here). This is quite a useful feature, and facilitates stricter validation while composing properties from multiple sub-schemas (using e.g. allOf) than would otherwise possible.

Looking through the issue history, I’ve seen a couple mentions of incorporating unevaluatedProperties into the OpenAPI specification. Here it was mentioned that this feature would be present in OAS 3.1. However, unless I’m missing something, I don’t see any references to it in the current version of the spec.

Are there still plans to support JSON Schema’s unevaluatedProperties in OpenAPI?

Asked Sep 2 ’21 at 00:09

avatar of eli-kaplan

eli-kaplan

2 Answers:

OAS 3.1 uses all of JSON Schema draft 2020-12 including unevaluatedProperties. You won’t find direct references to unevealuatedProperties in the OAS spec because it links to the JSON Schema spec instead of duplicating it’s contents.

github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schemaObject

The Schema Object […] is a superset of the JSON Schema Specification Draft 2020-12.
Unless stated otherwise, the property definitions follow those of JSON Schema and do not add any additional semantics.

Answered Sep 02 ’21 at 17:31

avatar of jdesrosiers

jdesrosiers

This question has come up before. Maybe it would be useful to have a bulleted list of all the keywords supported by JSON Schema, and a link to the specification section that explains each one?

Answered Sep 03 ’21 at 21:58

avatar of karenetheridge

karenetheridge

Read more here: Source link