Test Schema

Validate against: http://json-schema.org/draft-05/schema#

Schema ID: https://raw.githubusercontent.com/dwhieb/jschemer/master/test/test-schema.json

Description

This is a schema designed to test the jschemer package.

Type: object

Definitions

The following schema definitions may be used by this schema:

  • definedProp: "definedProp"

    Type: integer

Validates Against (allOf)

This schema must validate against all of the following schemas:

  • Required Properties

    • prop1

    Properties

    • Type: string

  • Required Properties

    • prop2

    Properties

    • Type: string

Validates Against (anyOf)

This schema must validate against at least one of the following schemas:

  • Required Properties

    • string-prop-1

    Properties

    • Type: string

  • Required Properties

    • string-prop-2

    Properties

    • Type: string

Validates Against (oneOf)

This schema must validate against one and only one of the following schemas:

  • Required Properties

    • oneOf1

    Properties

    • Type: number

  • Required Properties

    • oneOf2

    Properties

    • Type: string

Does Not Validate Against (not)

This schema must not validate against the following schema:

Required Properties

  • cid

Properties

  • Type: string

Min properties: 2

Max properties: 100

Required Properties

  • num

Additional properties: true

Dependencies

  • If the property obj is present, the following schema also applies:

    Required Properties

    • str
  • If the property arr1 is present, the following properties must also be present:

    • arr2

Properties

  • Array Property 1: "arr1"

    Type: array

    Items

    • Type: string

    • Must be an instance of the schema at #definedProp

    Additional Items

    additionalItems: "additionalItems"

    Type: object

  • Array Property 2: "arr2"

    Type: array

    Min items: 2

    Max items: 12

    Unique items: true

    Items

    Type: number

  • Array Property 3: "arr3"

    Type: array

    Items

    • Type: number

    • Type: number

  • Number Property: "num"

    Type: integer

    Multiple of: 4

    Minimum: 4

    Maximum: 20

    Exclusive maximum: true

  • Object Property: "obj"

    Type: object

    Additional Properties

    additionalProperties: "additionalProperties"

    Type: string

    Format: date-time

  • String Property: "str"

    Type: string

    Regular expression pattern: [a-z]

    Min length: 4

    Max length: 16

    Allowed Values (enum)

    • "aaaa"
    • "bbbbb"
    • "cccccc"
    • "ddddddd"

Custom Properties (patternProperties)

Property name must match the regular expression:

  • Type: string

Default Value

{
  "num": 8,
  "prop1": "hello",
  "prop2": "hola",
  "string-prop-1": "jambo",
  "oneOf1": "salve"
}