Skip to content

Commit c5ded55

Browse files
authored
Expose keyword instance types in the official walker (#1772)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 44f6036 commit c5ded55

12 files changed

+1640
-411
lines changed

src/core/jsonschema/include/sourcemeta/core/jsonschema_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ struct SchemaWalkerResult {
188188
/// The keywords a given keyword depends on (if any) during the evaluation
189189
/// process
190190
const std::set<std::string> dependencies;
191+
/// The JSON instance types that this keyword applies to (or to all of them)
192+
const std::set<JSON::Type> instances;
191193
};
192194

193195
/// @ingroup jsonschema

src/core/jsonschema/official_walker.cc

Lines changed: 571 additions & 410 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_2019_09_test.cc

Lines changed: 180 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_2020_12_test.cc

Lines changed: 187 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft0_test.cc

Lines changed: 105 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft1_test.cc

Lines changed: 105 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft2_test.cc

Lines changed: 109 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft3_test.cc

Lines changed: 84 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft4_test.cc

Lines changed: 87 additions & 0 deletions
Large diffs are not rendered by default.

test/jsonschema/jsonschema_official_walker_draft6_test.cc

Lines changed: 93 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)