Skip to content

Commit

Permalink
Update JSON Toolkit to 6c78f131 (#162)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Sep 9, 2024
1 parent 7ce5359 commit 39ccac4
Show file tree
Hide file tree
Showing 33 changed files with 3,481 additions and 3,172 deletions.
2 changes: 1 addition & 1 deletion DEPENDENCIES
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
vendorpull https://github.com/sourcemeta/vendorpull dea311b5bfb53b6926a4140267959ae334d3ecf4
noa https://github.com/sourcemeta/noa 7e26abce7a4e31e86a16ef2851702a56773ca527
jsontoolkit https://github.com/sourcemeta/jsontoolkit 2b5158f237584fff7e35d520c2e5a722d01fd678
jsontoolkit https://github.com/sourcemeta/jsontoolkit 6c78f131029c647be79cc5da5874fa8d50415cde
hydra https://github.com/sourcemeta/hydra 3c53d3fdef79e9ba603d48470a508cc45472a0dc
alterschema https://github.com/sourcemeta/alterschema a31722f04ae2d7e57f2fe5bbb0613670866c0840
3 changes: 1 addition & 2 deletions src/command_compile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ auto sourcemeta::jsonschema::cli::compile(
const auto compiled_schema{sourcemeta::jsontoolkit::compile(
schema, sourcemeta::jsontoolkit::default_schema_walker,
resolver(options, options.contains("h") || options.contains("http")),
sourcemeta::jsontoolkit::default_schema_compiler,
sourcemeta::jsontoolkit::SchemaCompilerCompilationMode::Optimized)};
sourcemeta::jsontoolkit::default_schema_compiler)};

const sourcemeta::jsontoolkit::JSON result{
sourcemeta::jsontoolkit::to_json(compiled_schema)};
Expand Down
3 changes: 1 addition & 2 deletions src/command_metaschema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ auto sourcemeta::jsonschema::cli::metaschema(
if (!cache.contains(dialect.value())) {
const auto metaschema_template{sourcemeta::jsontoolkit::compile(
metaschema, sourcemeta::jsontoolkit::default_schema_walker,
custom_resolver, sourcemeta::jsontoolkit::default_schema_compiler,
sourcemeta::jsontoolkit::SchemaCompilerCompilationMode::Optimized)};
custom_resolver, sourcemeta::jsontoolkit::default_schema_compiler)};
cache.insert({dialect.value(), metaschema_template});
}

Expand Down
3 changes: 1 addition & 2 deletions src/command_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ auto sourcemeta::jsonschema::cli::test(
try {
schema_template = sourcemeta::jsontoolkit::compile(
schema.value(), sourcemeta::jsontoolkit::default_schema_walker,
test_resolver, sourcemeta::jsontoolkit::default_schema_compiler,
sourcemeta::jsontoolkit::SchemaCompilerCompilationMode::Optimized);
test_resolver, sourcemeta::jsontoolkit::default_schema_compiler);
} catch (const sourcemeta::jsontoolkit::SchemaReferenceError &error) {
if (error.location().empty() && error.id() == schema_uri.recompose()) {
std::cout << "\n";
Expand Down
3 changes: 1 addition & 2 deletions src/command_validate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ auto sourcemeta::jsonschema::cli::validate(
const auto benchmark{options.contains("b") || options.contains("benchmark")};
const auto schema_template{sourcemeta::jsontoolkit::compile(
schema, sourcemeta::jsontoolkit::default_schema_walker, custom_resolver,
sourcemeta::jsontoolkit::default_schema_compiler,
sourcemeta::jsontoolkit::SchemaCompilerCompilationMode::Optimized)};
sourcemeta::jsontoolkit::default_schema_compiler)};

bool result{true};

Expand Down
54 changes: 10 additions & 44 deletions test/compile/pass_1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ EOF
cat << 'EOF' > "$TMP/expected.json"
[
{
"category": "logical",
"type": "and",
"value": null,
"category": "loop",
"type": "properties-match",
"value": {
"category": "value",
"type": "named-indexes",
"value": {
"foo": 0
}
},
"schemaResource": "",
"absoluteKeywordLocation": "#/properties",
"relativeSchemaLocation": "/properties",
"relativeInstanceLocation": "",
"target": {
"category": "target",
"type": "instance",
"location": ""
},
"report": true,
"dynamic": false,
"condition": [],
"children": [
{
"category": "logical",
Expand All @@ -45,36 +45,8 @@ cat << 'EOF' > "$TMP/expected.json"
"absoluteKeywordLocation": "#/properties",
"relativeSchemaLocation": "",
"relativeInstanceLocation": "",
"target": {
"category": "target",
"type": "instance",
"location": ""
},
"report": false,
"dynamic": false,
"condition": [
{
"category": "assertion",
"type": "defines",
"value": {
"category": "value",
"type": "string",
"value": "foo"
},
"schemaResource": "",
"absoluteKeywordLocation": "#/properties",
"relativeSchemaLocation": "",
"relativeInstanceLocation": "",
"target": {
"category": "target",
"type": "instance",
"location": ""
},
"report": false,
"dynamic": false,
"condition": []
}
],
"children": [
{
"category": "assertion",
Expand All @@ -88,14 +60,8 @@ cat << 'EOF' > "$TMP/expected.json"
"absoluteKeywordLocation": "#/properties/foo/type",
"relativeSchemaLocation": "/foo/type",
"relativeInstanceLocation": "/foo",
"target": {
"category": "target",
"type": "instance",
"location": ""
},
"report": true,
"dynamic": false,
"condition": []
"dynamic": false
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions vendor/jsontoolkit/CMakeLists.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/jsontoolkit/src/json/json_value.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39ccac4

Please sign in to comment.