-
Notifications
You must be signed in to change notification settings - Fork 76
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
DOCSP-41772-export-schema #731
base: master
Are you sure you want to change the base?
Changes from all commits
534342d
92a9321
fde6756
bf595b3
6718f08
dcd5c6c
d415f9e
46ec0c1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This is not an exhaustive list of all possible fields. For details on | ||
additional fields, see the | ||
`official JSON Schema spec <https://json-schema.org/draft/2020-12>`_. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
.. code-block:: json | ||
:linenos: | ||
:copyable: false | ||
|
||
{ | ||
"type": "object", | ||
"x-bsonType": "object", | ||
"required": [ | ||
"_id", | ||
"title", | ||
"year" | ||
], | ||
"properties": { | ||
"_id": { | ||
"$ref": "#/$defs/ObjectId", | ||
"x-bsonType": "objectId", | ||
"x-metadata": { | ||
"hasDuplicates": false, | ||
"probability": 1, | ||
"count": 3 | ||
}, | ||
"x-sampleValues": [ | ||
"573a1391f29313caabcd7616", | ||
"573a1392f29313caabcd9c1b", | ||
"573a1390f29313caabcd6223" | ||
] | ||
}, | ||
"genres": { | ||
"type": "array", | ||
"x-bsonType": "array", | ||
"x-metadata": { | ||
"hasDuplicates": true, | ||
"probability": 0.3333333333333333, | ||
"count": 1 | ||
}, | ||
"items": { | ||
"type": "string", | ||
"x-bsonType": "string", | ||
"x-metadata": { | ||
"hasDuplicates": false, | ||
"probability": 1, | ||
"count": 2 | ||
}, | ||
"x-sampleValues": [ | ||
"drama", | ||
"horror" | ||
] | ||
} | ||
}, | ||
"plot": { | ||
"type": "string", | ||
"x-bsonType": "string", | ||
"x-metadata": { | ||
"hasDuplicates": false, | ||
"probability": 0.6666666666666666, | ||
"count": 2 | ||
}, | ||
"x-sampleValues": [ | ||
"Salome, the daughter of Herodias, seduces her step-father/uncle Herod, ...", | ||
"Gwen's family is rich, but her parents ignore her and most of the serv..." | ||
] | ||
}, | ||
"title": { | ||
"type": "string", | ||
"x-bsonType": "string", | ||
"x-metadata": { | ||
"hasDuplicates": false, | ||
"probability": 1, | ||
"count": 3 | ||
}, | ||
"x-sampleValues": [ | ||
"Salomè", | ||
"Payment Deferred", | ||
"The Poor Little Rich Girl" | ||
] | ||
}, | ||
"year": { | ||
"type": "integer", | ||
"x-bsonType": "int", | ||
"x-metadata": { | ||
"hasDuplicates": false, | ||
"probability": 1, | ||
"count": 3 | ||
}, | ||
"x-sampleValues": [ | ||
1922, | ||
1932, | ||
1917 | ||
] | ||
} | ||
}, | ||
"$defs": { | ||
"ObjectId": { | ||
"type": "object", | ||
"properties": { | ||
"$oid": { | ||
"type": "string", | ||
"pattern": "^[0-9a-fA-F]{24}$" | ||
} | ||
}, | ||
"required": [ | ||
"$oid" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. code-block:: json | ||
:linenos: | ||
:copyable: false | ||
|
||
{ | ||
"$jsonSchema": { | ||
"bsonType": "object", | ||
"required": [ | ||
"_id", | ||
"title", | ||
"year" | ||
], | ||
"properties": { | ||
"_id": { | ||
"bsonType": "objectId" | ||
}, | ||
"genres": { | ||
"bsonType": "array", | ||
"items": { | ||
"bsonType": "string" | ||
} | ||
}, | ||
"plot": { | ||
"bsonType": "string" | ||
}, | ||
"title": { | ||
"bsonType": "string" | ||
}, | ||
"year": { | ||
"bsonType": "int" | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
.. code-block:: json | ||
:linenos: | ||
:copyable: false | ||
|
||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"type": "object", | ||
"required": [ | ||
"_id", | ||
"title", | ||
"year" | ||
], | ||
"properties": { | ||
"_id": { | ||
"$ref": "#/$defs/ObjectId" | ||
}, | ||
"genres": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"plot": { | ||
"type": "string" | ||
}, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"year": { | ||
"type": "integer" | ||
} | ||
}, | ||
"$defs": { | ||
"ObjectId": { | ||
"type": "object", | ||
"properties": { | ||
"$oid": { | ||
"type": "string", | ||
"pattern": "^[0-9a-fA-F]{24}$" | ||
} | ||
}, | ||
"required": [ | ||
"$oid" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
Expanded format schema objects contain these fields in addition to the | ||||||
Standard Schema fields: | ||||||
|
||||||
.. list-table:: | ||||||
:header-rows: 1 | ||||||
:widths: 35 25 40 | ||||||
|
||||||
* - Property | ||||||
- Data type | ||||||
- Description | ||||||
|
||||||
* - ``x-bsonType`` | ||||||
- string or array | ||||||
- |bson| type of this field. | ||||||
|
||||||
* - ``x-metadata`` | ||||||
- document | ||||||
- Document containing metadata about the field. | ||||||
|
||||||
* - ``hasDuplicates`` | ||||||
- boolean | ||||||
- ``true`` if a single value appears multiple times in this | ||||||
field. Otherwise ``false``. | ||||||
|
||||||
* - ``probability`` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||||||
- float | ||||||
- Probability that the field exists in a random document. | ||||||
|
||||||
* - ``count`` | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated. |
||||||
- integer | ||||||
- Number of documents from the sample that have this field. | ||||||
|
||||||
* - ``x-sampleValues`` | ||||||
- array | ||||||
- Sample values as Expanded JSON. Sample values are limited to | ||||||
the first 100 characters. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
MongoDB format schema objects contain the following fields: | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
:widths: 35 25 40 | ||
|
||
* - Property | ||
- Data type | ||
- Description | ||
|
||
* - ``bsonType`` | ||
- string or array of strings | ||
- |bson| type of this field. | ||
|
||
* - ``required`` | ||
- array of strings | ||
- Fields that must appear in the schema. | ||
|
||
* - ``properties`` | ||
- document | ||
- Properties for each field. Keys are property names and values are | ||
subschemas. | ||
|
||
* - ``items`` | ||
- document | ||
- Metadata about elements in array fields. Metadata appears as | ||
embedded subschemas. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Standard format schema objects contain the following fields: | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
:widths: 35 25 40 | ||
|
||
* - Property | ||
- Data type | ||
- Description | ||
|
||
* - ``type`` | ||
- string or array | ||
- JSON type of this data type. For details, see the `official JSON | ||
docs <https://json-schema.org/draft/2020-12/json-schema-validation#name-type>`_. | ||
|
||
* - ``required`` | ||
- array of strings | ||
- Fields that must appear in the schema. For details, see the | ||
`official JSON docs <https://json-schema.org/draft/2020-12/json-schema-validation#name-required>`_. | ||
|
||
* - ``properties`` | ||
- object | ||
- Properties for each field. Keys are property names and values are | ||
subschemas. For details, see the `official JSON docs | ||
<https://json-schema.org/draft/2020-12/json-schema-core#section-10.3.2.1>`_. | ||
|
||
* - ``items`` | ||
- document | ||
- Metadata about elements in array fields. Metadata appears as | ||
embedded subschemas. For details, see the `official | ||
JSON docs <https://json-schema.org/draft/2020-12/json-schema-core#section-10.3.1.2>`_. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.