#include <folly/json/JSONSchema.h>
#include <boost/algorithm/string/replace.hpp>
#include <boost/regex.hpp>
#include <folly/CPortability.h>
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <folly/Optional.h>
#include <folly/Singleton.h>
#include <folly/String.h>
#include <folly/json/json.h>
#include <folly/portability/Math.h>
namespace folly {
namespace jsonschema {
namespace {
struct FOLLY_EXPORT SchemaError : std::runtime_error { … };
template <class... Args>
Optional<SchemaError> makeError(Args&&... args) { … }
struct ValidationContext;
struct IValidator { … };
struct ValidationContext { … };
struct SchemaValidatorContext final { … };
struct SchemaValidator final : IValidator, public Validator { … };
struct MultipleOfValidator final : IValidator { … };
struct ComparisonValidator final : IValidator { … };
template <class Comparison>
struct SizeValidator final : IValidator { … };
struct StringPatternValidator final : IValidator { … };
struct ArrayUniqueValidator final : IValidator { … };
struct ArrayItemsValidator final : IValidator { … };
struct RequiredValidator final : IValidator { … };
struct PropertiesValidator final : IValidator { … };
struct DependencyValidator final : IValidator { … };
struct EnumValidator final : IValidator { … };
struct TypeValidator final : IValidator { … };
struct AllOfValidator final : IValidator { … };
struct AnyOfValidator final : IValidator { … };
struct RefValidator final : IValidator { … };
struct NotValidator final : IValidator { … };
void SchemaValidator::loadSchema(
SchemaValidatorContext& context, const dynamic& schema) { … }
void SchemaValidator::validate(const dynamic& value) const { … }
exception_wrapper SchemaValidator::try_validate(
const dynamic& value) const noexcept { … }
Optional<SchemaError> SchemaValidator::validate(
ValidationContext& vc, const dynamic& value) const { … }
const char* metaschemaJson = …;
folly::Singleton<Validator> schemaValidator([]() { … });
}
Validator::~Validator() = default;
std::unique_ptr<Validator> makeValidator(const dynamic& schema) { … }
std::shared_ptr<Validator> makeSchemaValidator() { … }
}
}