Ajout du validateur json + correctif factory metadata
This commit is contained in:
16
lib/All/json-schema-validator/test/issue-98.cpp
Normal file
16
lib/All/json-schema-validator/test/issue-98.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <nlohmann/json-schema.hpp>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
nlohmann::json nlBase{{"$ref", "#/unknown/keywords"}};
|
||||
nlohmann::json_schema::json_validator validator;
|
||||
|
||||
try {
|
||||
validator.set_root_schema(nlBase); // this line will log the caught exception
|
||||
} catch (const std::exception &e) {
|
||||
|
||||
if (std::string("after all files have been parsed, '<root>' has still the following undefined references: [/unknown/keywords]") == e.what())
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Reference in New Issue
Block a user