Module json

Source
Expand description

This module contains the Draft-04 JSON schema typings

{
    "type": "object",
    "required": ["_id"],
    "properties": {
        "_id": {}
    }
}

type and bsonType can be used interchangeably when they both make sense (i.e. when bsonType maps onto JSON type). The main [MongodbJsonSchema] struct maps the following cases:

  1. TypedJsonSchema a full BSON typed schema
  2. MultipleTypedJsonSchema a full BSON typed schema with multiple types
  3. AllOfJsonSchema a list of schemas in AND
  4. AnyOfJsonSchema a list of schemas in OR
  5. OneOfJsonSchema a list of mutually exclusive schemas
  6. JsonSchema::Exists when a field exist but no validation is imposed

Structs§

AllOfJsonSchema
AnyOfJsonSchema
ArraySchema
MultipleTypedJsonSchema
NumberSchema
ObjectSchema
OneOfJsonSchema
SharedSchema
StringSchema

Enums§

Additional
Items
JsonSchema
Number
TypedJsonSchema
Types
Integer is not listed here since mongodb does not support it.