Sha256: 3daa4059d0625ad287b340ce48ed355dae3d60149de662fa0c8c200543cc5962

Contents?: true

Size: 1.92 KB

Versions: 19

Compression:

Stored size: 1.92 KB

Contents

[
    {
        "description": "simple enum validation",
        "schema": {"enum": [1, 2, 3]},
        "tests": [
            {
                "description": "one of the enum is valid",
                "data": 1,
                "valid": true
            },
            {
                "description": "something else is invalid",
                "data": 4,
                "valid": false
            }
        ]
    },
    {
        "description": "heterogeneous enum validation",
        "schema": {"enum": [6, "foo", [], true, {"foo": 12}]},
        "tests": [
            {
                "description": "one of the enum is valid",
                "data": [],
                "valid": true
            },
            {
                "description": "something else is invalid",
                "data": null,
                "valid": false
            },
            {
                "description": "objects are deep compared",
                "data": {"foo": false},
                "valid": false
            }
        ]
    },
    {
        "description": "enums in properties",
        "schema": {
           "type":"object",
		     "properties": {
		        "foo": {"enum":["foo"]},
		        "bar": {"enum":["bar"], "required":true}
		     }
		  },
        "tests": [
            {
                "description": "both properties are valid",
                "data": {"foo":"foo", "bar":"bar"},
                "valid": true
            },
            {
                "description": "missing optional property is valid",
                "data": {"bar":"bar"},
                "valid": true
            },
            {
                "description": "missing required property is invalid",
                "data": {"foo":"foo"},
                "valid": false
            },
            {
                "description": "missing all properties is invalid",
                "data": {},
                "valid": false
            }
        ]
    }
]

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rj_schema-1.0.5 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-1.0.4 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-1.0.3 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-1.0.2 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-1.0.1 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-1.0.0 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.6 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.5 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.3 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.2 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.1 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.2.0 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.1.4 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.1.3 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.1.2 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.1.1 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.1.0 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.0.2 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json
rj_schema-0.0.1 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft3/enum.json