@@ -17,7 +17,7 @@ Definition
17
17
18
18
.. versionadded:: 3.6
19
19
20
- The :query:`$jsonSchema` operator matches documents that validate against
20
+ The :query:`$jsonSchema` operator matches documents that validate against
21
21
the given JSON Schema.
22
22
23
23
.. code-block:: javascript
@@ -26,13 +26,13 @@ Definition
26
26
27
27
.. note::
28
28
29
- MongoDB 3.6 supports draft 4 of JSON Schema, including
30
- `core specification <https://tools.ietf.org/html/draft-zyp-json-schema-04>`_
31
- and `validation specification
29
+ MongoDB 3.6 supports draft 4 of JSON Schema, including
30
+ `core specification <https://tools.ietf.org/html/draft-zyp-json-schema-04>`_
31
+ and `validation specification
32
32
<https://tools.ietf.org/html/draft-fge-json-schema-validation-00>`_,
33
33
with some differences. See `Extensions` and `Omissions` for details.
34
34
35
- For more information about JSON Schema, see the
35
+ For more information about JSON Schema, see the
36
36
`official website <http://json-schema.org/>`_.
37
37
38
38
Behavior
@@ -45,9 +45,9 @@ aggregation stage.
45
45
46
46
.. warning::
47
47
48
- ``featureCompatibilityVersion`` must be set to ``"3.6"`` or higher in order to
49
- use :query:`$jsonSchema` in a document validator. Any such validator must be
50
- removed, either by dropping the collection or by using :dbcommand:`collMod`,
48
+ ``featureCompatibilityVersion`` must be set to ``"3.6"`` or higher in order to
49
+ use :query:`$jsonSchema` in a document validator. Any such validator must be
50
+ removed, either by dropping the collection or by using :dbcommand:`collMod`,
51
51
before downgrading to version 3.4 of the server.
52
52
53
53
Available Keywords
@@ -59,16 +59,16 @@ Extensions
59
59
----------
60
60
61
61
MongoDB's implementation of JSON Schema includes the addition of the ``bsonType``
62
- keyword, which allows you to use all :term:`BSON` types in the
63
- :query:`$jsonSchema` operator. ``bsonType`` accepts the same string aliases used
62
+ keyword, which allows you to use all :term:`BSON` types in the
63
+ :query:`$jsonSchema` operator. ``bsonType`` accepts the same string aliases used
64
64
for the :query:`$type` operator.
65
65
66
66
Omissions
67
67
---------
68
68
69
69
The following will not be supported in MongoDB's implementation of JSON Schema:
70
70
71
- - `Hypertext definitions <https://tools.ietf.org/html/draft-luff-json-hyper-schema-00>`_
71
+ - `Hypertext definitions <https://tools.ietf.org/html/draft-luff-json-hyper-schema-00>`_
72
72
in draft 4 of the JSON Schema spec.
73
73
74
74
- The keywords:
@@ -106,7 +106,7 @@ collection named ``students`` and uses the :query:`$jsonSchema`
106
106
operator to set multiple rules for the schema design:
107
107
108
108
.. code-block:: javascript
109
-
109
+
110
110
db.createCollection("students", {
111
111
validator: {
112
112
$jsonSchema: {
@@ -143,7 +143,7 @@ operator to set multiple rules for the schema design:
143
143
144
144
Given the created ``validator`` for the collection, the following insert
145
145
operation will fail because ``gpa`` is an integer when the ``validator``
146
- requires a ``double``.
146
+ requires a ``double``.
147
147
148
148
.. code-block:: javascript
149
149
@@ -154,7 +154,7 @@ requires a ``double``.
154
154
gpa: NumberInt(3)
155
155
})
156
156
157
- The opration returns the following error:
157
+ The operation returns the following error:
158
158
159
159
.. code-block:: javascript
160
160
0 commit comments