| 22 | } |
| 23 | |
| 24 | static void loader(const json_uri &uri, json &schema) |
| 25 | { |
| 26 | std::string filename = "./" + uri.path(); |
| 27 | std::ifstream lf(filename); |
| 28 | if (!lf.good()) |
| 29 | throw std::invalid_argument("could not open " + uri.url() + " tried with " + filename); |
| 30 | try { |
| 31 | lf >> schema; |
| 32 | } catch (const std::exception &e) { |
| 33 | throw e; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | class custom_error_handler : public nlohmann::json_schema::basic_error_handler |
| 38 | { |
nothing calls this directly
no outgoing calls
no test coverage detected