Skip to content

Commit 912ef8d

Browse files
v3.1.0: rephrase data-type section because format keyword can be used for any data type. (#2302)
* The JSON schema specification states the format keyword can be used for any data type, not just primitive types * The JSON schema specification states the format keyword can be used for any data type, not just primitive types
1 parent df7f5f9 commit 912ef8d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

versions/3.1.0.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,12 @@ It is RECOMMENDED that the root OpenAPI document be named: `openapi.json` or `op
139139

140140
### <a name="dataTypes"></a>Data Types
141141

142-
Primitive data types in the OAS are based on the types supported by the [JSON Schema Specification Draft 2019-09](http://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2).
142+
Data types in the OAS are based on the types supported by the [JSON Schema Specification Draft 2019-09](http://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.4.2).
143143
Note that `integer` as a type is also supported and is defined as a JSON number without a fraction or exponent part.
144144
Models are defined using the [Schema Object](#schemaObject), which is a superset of JSON Schema Specification Draft 2019-09.
145145

146-
<a name="dataTypeFormat"></a>Primitives have an optional modifier property: `format`, which is defined by JSON Schema.
147-
OAS uses several known additional formats to define in fine detail the data type being used.
148-
However, to support documentation needs, the `format` property is an open `string`-valued property, and can have any value.
149-
Additional formats MAY be used even though undefined by either JSON Schema or this specification.
150-
Types that are not accompanied by a `format` property follow the type definition in the JSON Schema. Tools that do not recognize a specific `format` MAY default back to the `type` alone, as if the `format` is not specified.
151-
152-
Note that by default, JSON Schema validators will not attempt to validate the `format` keyword. https://json-schema.org/draft/2019-09/release-notes.html#format-vocabulary
146+
<a name="dataTypeFormat"></a>As defined by JSON Schema, data types can have an optional modifier property: `format`.
147+
OAS defines additional formats to provide fine detail for primitive data types.
153148

154149
The formats defined by the OAS are:
155150

0 commit comments

Comments
 (0)