Skip to content

DOCSP-3622: $jsonSchema type keyword does not support "integer", us… #3502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions source/includes/fact-json-schema-validation-keywords.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. list-table::
:header-rows: 1
:widths: 15 15 20 50

* - Keyword
- Type
Expand All @@ -22,6 +23,10 @@
- string or array of unique strings
- Enumerates the possible JSON types of the field. Available types are
"object", "array", "number", "boolean", "string", and "null".

MongoBD's implementation of the JSON Schema does not support the
"integer" type. Use the ``bsonType`` keyword and the
"int" or "long" types instead.

* - allOf
- all types
Expand Down
7 changes: 7 additions & 0 deletions source/reference/operator/query/jsonSchema.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ aggregation stage.
Available Keywords
~~~~~~~~~~~~~~~~~~

.. note::

MongoDB implements a subset of keywords available in JSON Schema.
For a complete list of omissions, see :ref:`json-schema-omission`.

.. include:: /includes/fact-json-schema-validation-keywords.rst

Extensions
Expand All @@ -63,6 +68,8 @@ keyword, which allows you to use all :term:`BSON` types in the
:query:`$jsonSchema` operator. ``bsonType`` accepts the same string aliases used
for the :query:`$type` operator.

.. _json-schema-omission:

Omissions
---------

Expand Down