diff --git a/src/json-validator.cpp b/src/json-validator.cpp index 5f5d6fa..3862bf4 100644 --- a/src/json-validator.cpp +++ b/src/json-validator.cpp @@ -538,11 +538,6 @@ void json_validator::validate_object(json &instance, const json &schema, const s void json_validator::validate(json &instance, const json &schema_, const std::string &name) { - not_yet_implemented(schema_, "allOf", "all"); - not_yet_implemented(schema_, "anyOf", "all"); - not_yet_implemented(schema_, "oneOf", "all"); - not_yet_implemented(schema_, "not", "all"); - const json *schema = &schema_; do { @@ -558,6 +553,11 @@ void json_validator::validate(json &instance, const json &schema_, const std::st break; } while (1); // loop in case of nested refs + not_yet_implemented(*schema, "allOf", "all"); + not_yet_implemented(*schema, "anyOf", "all"); + not_yet_implemented(*schema, "oneOf", "all"); + not_yet_implemented(*schema, "not", "all"); + validate_enum(instance, *schema, name); switch (instance.type()) {