From 9e87b01befd1106f875a8c8e021379c315f18946 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Wed, 6 Feb 2019 10:43:43 -0600 Subject: [PATCH] Fix reference to "contentType" It looks like this was an outdated reference from previous drafts that was not updated to be "contentMediaType" (as the rest of the document refers the attribute). --- latest/json-schema-validation.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/latest/json-schema-validation.html b/latest/json-schema-validation.html index 77c144ba..73fa79a8 100644 --- a/latest/json-schema-validation.html +++ b/latest/json-schema-validation.html @@ -656,7 +656,7 @@

3.2. Validation is a process of checking assertions. Each assertion adds constraints that an instance must satisfy in order to successfully validate.

Assertion keywords that are absent never restrict validation. In some cases, this no-op behavior is identical to a keyword that exists with certain values, and these values are noted where known.

All of the keywords in the general [general], numeric [numeric], and string [string] sections are assertions, as well as "minItems", "maxItems", "uniqueItems", "minProperties", "maxProperties", and "required". Additionally, "dependencies" is shorthand for a combination of conditional and assertion keywords.

-

The "format", "contentType", and "contentEncoding" keywords can also be implemented as assertions, although that functionality is an optional part of this specification, and the keywords convey additional non-assertion information.

+

The "format", "contentMediaType", and "contentEncoding" keywords can also be implemented as assertions, although that functionality is an optional part of this specification, and the keywords convey additional non-assertion information.

3.2.1. Assertions and Instance Primitive Types

Most validation assertions only constrain values within a certain primitive type. When the type of the instance is not of the type targeted by the keyword, the instance is considered to conform to the assertion.

For example, the "maxLength" keyword will only restrict certain strings (that are too long) from being valid. If the instance is a number, boolean, null, array, or object, then it is valid against this assertion.