Skip to content

Commit ceadbe1

Browse files
committed
Be more clear about format support
Most 2020-12 validators do not validate it, which is a regular point of confusion worth highlighting.
1 parent 84815b5 commit ceadbe1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

versions/3.1.1.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ Data types in the OAS are based on the types supported by the [JSON Schema Speci
146146
Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part.
147147
Models are defined using the [Schema Object](#schemaObject), which is a superset of JSON Schema Specification Draft 2020-12.
148148

149-
<a name="dataTypeFormat"></a>As defined by the [JSON Schema Validation vocabulary](https://tools.ietf.org/html/draft-bhutton-json-schema-validation-00#section-7.3), data types can have an optional modifier property: `format`.
149+
<a name="dataTypeFormat"></a>As defined by the [JSON Schema Validation specification](https://tools.ietf.org/html/draft-bhutton-json-schema-validation-00#section-7.3), data types can have an optional modifier property: `format`. Note that by default, JSON Schema draft 2020-12 validators _do not_ validate `format`, but instead treat it as an annotation. Support for `format` validation, either in best-effort form with the default `format-annotation` vocabulary, or with the less-commonly-implemented `format-assertion` vocabulary, varies among JSON Schema implementations.
150+
150151
OAS defines additional formats to provide fine detail for primitive data types.
151152

152153
The formats defined by the OAS are:

0 commit comments

Comments
 (0)