| 71 | )"); |
| 72 | |
| 73 | class store_ptr_err_handler : public nlohmann::json_schema::basic_error_handler |
| 74 | { |
| 75 | void error(const nlohmann::json::json_pointer &ptr, const json &, const std::string &message) override |
| 76 | { |
| 77 | nlohmann::json_schema::basic_error_handler::error(ptr, "", message); |
| 78 | std::cerr << "ERROR: '" << ptr << "' - '" |
| 79 | << "" |
| 80 | << "': " << message << "\n"; |
| 81 | failed_pointers.push_back(ptr); |
| 82 | } |
| 83 | |
| 84 | public: |
| 85 | std::vector<nlohmann::json::json_pointer> failed_pointers; |
| 86 | |
| 87 | void reset() override |
| 88 | { |
| 89 | nlohmann::json_schema::basic_error_handler::reset(); |
| 90 | failed_pointers.clear(); |
| 91 | } |
| 92 | }; |
| 93 | |
| 94 | static void content(const std::string &contentEncoding, const std::string &contentMediaType, const json &instance) |
| 95 | { |
nothing calls this directly
no outgoing calls
no test coverage detected