code cleanup and comment for a FIXME

This commit is contained in:
Patrick Boettcher 2017-01-12 16:18:34 +01:00
parent ec4d260f9c
commit c78ca226a8
2 changed files with 2 additions and 3 deletions

View File

@ -37,7 +37,6 @@ static void usage(const char *name)
exit(EXIT_FAILURE);
}
#if 0
resolver r(nlohmann::json_schema_draft4::root_schema,
nlohmann::json_schema_draft4::root_schema["id"]);
@ -63,7 +62,6 @@ int main(int argc, char *argv[])
if (argc != 2)
usage(argv[0]);
std::fstream f(argv[1]);
if (!f.good()) {
std::cerr << "could not open " << argv[1] << " for reading\n";
@ -80,7 +78,7 @@ int main(int argc, char *argv[])
}
// 2) create the validator and
json_validator validator(loader, [](const std::string&, const std::string&){});
json_validator validator(loader, [](const std::string &, const std::string &) {});
try {
// insert this schema as the root to the validator

View File

@ -52,6 +52,7 @@ class resolver
schema_refs[id] = &schema;
for (auto i = schema.begin(), end = schema.end(); i != end; ++i) {
// FIXME: this inhibits the user adding elements with the key "default"
if (i.key() == "default") /* default value can be objects, but are not schemas */
continue;