Sha256: 245bc40854457d5e278c7a85dc7dc3f1f7f6a3814c1ac36730595aa78ad739c8

Contents?: true

Size: 1.93 KB

Versions: 79

Compression:

Stored size: 1.93 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": ["bar"]
		  },
        "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

79 entries across 74 versions & 14 rubygems

Version Path
rj_schema-1.0.5 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
rj_schema-1.0.4 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
rj_schema-1.0.3 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
rj_schema-1.0.2 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
rj_schema-1.0.1 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
rj_schema-1.0.0 ext/rj_schema/rapidjson/bin/jsonschema/tests/draft4/enum.json
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.4-universal-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.4 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.3-x86_64-linux ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.3-x86_64-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.3-universal-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.3 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.2-x86_64-linux ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.2-x86_64-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.2-universal-darwin-19 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.2 ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.1-x86_64-linux ext/third_party/json/tests/draft4/enum.json
couchbase-3.0.0.alpha.1-x86_64-darwin-19 ext/third_party/json/tests/draft4/enum.json