Skip to content

Commit

Permalink
default_base_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
danielaparker committed Dec 4, 2024
1 parent 90b339f commit eb256c1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
{
/*{
"description":
"patternProperties validates properties matching a regex",
"schema": {
Expand Down Expand Up @@ -85,7 +85,7 @@
"valid": false
}
]
},
},*/
{
"description": "regexes are not anchored by default and are case sensitive",
"schema": {
Expand All @@ -95,7 +95,7 @@
}
},
"tests": [
{
/*{
"description": "non recognized members are ignored",
"data": { "answer 1": "42" },
"valid": true
Expand All @@ -114,9 +114,9 @@
"description": "regexes are case sensitive, 2",
"data": { "a_X_3": 3 },
"valid": false
}
}*/
]
},
}/*,
{
"description": "patternProperties with boolean schemas",
"schema": {
Expand Down Expand Up @@ -167,5 +167,5 @@
"valid": true
}
]
}
}*/
]
9 changes: 6 additions & 3 deletions test/jsonschema/src/jsonschema_draft7_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ TEST_CASE("jsonschema draft7 tests")
{
SECTION("issues")
{
jsonschema_tests("./jsonschema/issues/draft7/issue-520.json",
jsonschema::evaluation_options{}.default_version(jsonschema::schema_version::draft7()).
require_format_validation(true));
jsonschema_tests("./jsonschema/JSON-Schema-Test-Suite/tests/draft7/patternProperties.json");
//jsonschema_tests("./jsonschema/issues/draft7/issue-520.json",
// jsonschema::evaluation_options{}.default_version(jsonschema::schema_version::draft7()).
// require_format_validation(true));
}
#if 0
SECTION("tests")
{
jsonschema_tests("./jsonschema/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json");
Expand Down Expand Up @@ -239,4 +241,5 @@ TEST_CASE("jsonschema draft7 tests")

CHECK_FALSE(compiled.is_valid(instance));
}
#endif
}
2 changes: 1 addition & 1 deletion test/jsonschema/src/schema_version_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ TEST_CASE("jsonschema version tests")

SECTION("test 7")
{
REQUIRE_THROWS_WITH(jsonschema::make_json_schema(schema_07), "#/properties/price/exclusiveMinimum: exclusiveMinimum must be a number value");
REQUIRE_THROWS_WITH(jsonschema::make_json_schema(schema_07), "https://jsoncons.com#/properties/price/exclusiveMinimum: exclusiveMinimum must be a number value");
}
}

0 comments on commit eb256c1

Please sign in to comment.