mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-02-03 07:32:54 +01:00
commit
ae0112b4be
14
Doxyfile
14
Doxyfile
@ -194,7 +194,7 @@ QT_AUTOBRIEF = NO
|
||||
# tag to YES if you prefer the old behavior instead.
|
||||
#
|
||||
# Note that setting this tag to YES also means that rational rose comments are
|
||||
# not recognized any more.
|
||||
# not recognized anymore.
|
||||
# The default value is: NO.
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
@ -268,7 +268,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
@ -494,7 +494,7 @@ INTERNAL_DOCS = NO
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# in case and if your file system supports case-sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
@ -659,7 +659,7 @@ SHOW_NAMESPACES = YES
|
||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||
# doxygen should invoke to get the current version for each file (typically from
|
||||
# the version control system). Doxygen will invoke the program by executing (via
|
||||
# popen()) the command command input-file, where command is the value of the
|
||||
# popen()) the command input-file, where command is the value of the
|
||||
# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
|
||||
# by doxygen. Whatever the program writes to standard output is used as the file
|
||||
# version. For an example see the documentation.
|
||||
@ -1405,7 +1405,7 @@ EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
FORMULA_FONTSIZE = 10
|
||||
|
||||
# Use the FORMULA_TRANPARENT tag to determine whether or not the images
|
||||
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
|
||||
# generated for formulas are transparent PNGs. Transparent PNGs are not
|
||||
# supported properly for IE 6.0, but are supported on all modern browsers.
|
||||
#
|
||||
@ -1417,7 +1417,7 @@ FORMULA_FONTSIZE = 10
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# http://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@ -1487,7 +1487,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
|
@ -90,7 +90,7 @@ This will create a validator that will attempt to cast values to satisfy a schem
|
||||
## Regular Expression Engine
|
||||
|
||||
When enforcing a 'pattern' property, a regular expression engine is used. By default, the default regular expression (`DefaultRegexEngine`) uses `std::regex`.
|
||||
Unfortunaltey, `std::regex` has no protection against catastrophic backtracking and the implementation in gcc is so suboptimal that it can easily lead to segmentation faults.
|
||||
Unfortunately, `std::regex` has no protection against catastrophic backtracking and the implementation in gcc is so suboptimal that it can easily lead to segmentation faults.
|
||||
|
||||
This behaviour can be customised by implementing a wrapper for alternative regular expression engine.
|
||||
|
||||
@ -282,9 +282,9 @@ Here is a screenshot of JSON Inspector in action:
|
||||
|
||||
## Live Demo
|
||||
|
||||
A web-based demo can be found [here](https://letmaik.github.io/valijson-wasm), courtesy of [Maik Riechert](https://github.com/letmaik).
|
||||
A [web-based demo is available](https://letmaik.github.io/valijson-wasm), courtesy of [Maik Riechert](https://github.com/letmaik).
|
||||
|
||||
This demo uses Emscripten to compile Valijson and Nlohmann JSON (JSON for Modern C++) to WebAssembly. The source code can be found [here](https://github.com/letmaik/valijson-wasm) and is available under the MIT license.
|
||||
This demo uses Emscripten to compile Valijson and Nlohmann JSON (JSON for Modern C++) to WebAssembly. The source code can be found in [letmaik/valijson-wasm](https://github.com/letmaik/valijson-wasm) and is available under the MIT license.
|
||||
|
||||
![WebAssembly Demo](doc/screenshots/wasm.png)
|
||||
|
||||
|
@ -579,14 +579,14 @@ Internet-Draft JSON Schema Media Type November 2010
|
||||
This attribute indicates if the value of the instance (if the
|
||||
instance is a number) can not equal the number defined by the
|
||||
"minimum" attribute. This is false by default, meaning the instance
|
||||
value can be greater then or equal to the minimum value.
|
||||
value can be greater than or equal to the minimum value.
|
||||
|
||||
5.12. exclusiveMaximum
|
||||
|
||||
This attribute indicates if the value of the instance (if the
|
||||
instance is a number) can not equal the number defined by the
|
||||
"maximum" attribute. This is false by default, meaning the instance
|
||||
value can be less then or equal to the maximum value.
|
||||
value can be less than or equal to the maximum value.
|
||||
|
||||
5.13. minItems
|
||||
|
||||
|
@ -61,7 +61,7 @@ int main()
|
||||
|
||||
iter = obj.find("$ref");
|
||||
if (iter != obj.cend()) {
|
||||
std::cerr << "Invalid iterator for non-existent key $ref" << std::endl;
|
||||
std::cerr << "Invalid iterator for nonexistent key $ref" << std::endl;
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
@ -83,11 +83,11 @@ VALIJSON_NORETURN inline void throwNotSupported() {
|
||||
#
|
||||
# if defined __clang_major__
|
||||
# if (__clang_major__ == 3 && __clang_minor__ >= 5)
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# elif (__clang_major__ > 3)
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# endif
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# define TR2_OPTIONAL_CLANG_3_4_2_AND_HIGHER_
|
||||
# elif (__clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ >= 2)
|
||||
# define TR2_OPTIONAL_CLANG_3_4_2_AND_HIGHER_
|
||||
@ -123,7 +123,7 @@ VALIJSON_NORETURN inline void throwNotSupported() {
|
||||
# define OPTIONAL_CONSTEXPR_INIT_LIST
|
||||
# endif
|
||||
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_ && (defined __cplusplus) && (__cplusplus != 201103L)
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_ && (defined __cplusplus) && (__cplusplus != 201103L)
|
||||
# define OPTIONAL_HAS_MOVE_ACCESSORS 1
|
||||
# else
|
||||
# define OPTIONAL_HAS_MOVE_ACCESSORS 0
|
||||
@ -1152,7 +1152,7 @@ public:
|
||||
*
|
||||
* This function shall return a boolean value if the Adapter contains either
|
||||
* an actual boolean value, or one of the strings 'true' or 'false'.
|
||||
* The string comparison is case sensitive.
|
||||
* The string comparison is case-sensitive.
|
||||
*
|
||||
* An exception shall be thrown if the value cannot be cast to a boolean.
|
||||
*
|
||||
@ -1165,7 +1165,7 @@ public:
|
||||
*
|
||||
* This function shall retrieve a boolean value if the Adapter contains
|
||||
* either an actual boolean value, or one of the strings 'true' or 'false'.
|
||||
* The string comparison is case sensitive.
|
||||
* The string comparison is case-sensitive.
|
||||
*
|
||||
* The retrieved value is returned via reference.
|
||||
*
|
||||
@ -2732,7 +2732,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
|
||||
* at least one character in length to be considered valid.
|
||||
*
|
||||
* Once the next reference token has been identified, it will be used either as
|
||||
* an array index or as an the name an object member. The validity of a
|
||||
* an array index or as the name of an object member. The validity of a
|
||||
* reference token depends on the type of the node currently being traversed,
|
||||
* and the applicability of the token to that node. For example, an array can
|
||||
* only be dereferenced by a non-negative integral index.
|
||||
@ -3453,7 +3453,7 @@ private:
|
||||
/// Schema description (optional)
|
||||
opt::optional<std::string> m_description;
|
||||
|
||||
/// Id to apply when resolving the schema URI
|
||||
/// ID to apply when resolving the schema URI
|
||||
opt::optional<std::string> m_id;
|
||||
|
||||
/// Title string associated with the schema (optional)
|
||||
@ -3550,7 +3550,7 @@ public:
|
||||
void addConstraintToSubschema(const Constraint &constraint,
|
||||
const Subschema *subschema)
|
||||
{
|
||||
// TODO: Check heirarchy for subschemas that do not belong...
|
||||
// TODO: Check hierarchy for subschemas that do not belong...
|
||||
|
||||
mutableSubschema(subschema)->addConstraint(constraint);
|
||||
}
|
||||
@ -5201,7 +5201,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Add a custom contraint to this SchemaParser
|
||||
* @brief Add a custom constraint to this SchemaParser
|
||||
|
||||
* @param key name that will be used to identify relevant constraints
|
||||
* while parsing a schema document
|
||||
@ -5520,7 +5520,7 @@ private:
|
||||
// visited before arriving at the current node
|
||||
updateSchemaCache(schemaCache, newCacheKeys, subschema);
|
||||
|
||||
// Schema cache did not contain a pre-existing schema corresponding
|
||||
// Schema cache did not contain a preexisting schema corresponding
|
||||
// to the current node, so the schema that was returned will need
|
||||
// to be populated
|
||||
if (!cachedPtr) {
|
||||
@ -6435,11 +6435,11 @@ private:
|
||||
* When parsing a Draft 3 schema, in addition to the formats above, the
|
||||
* following format can be used:
|
||||
* - a string that names a single property that must be present if the
|
||||
* dependent property is presnet
|
||||
* dependent property is present
|
||||
*
|
||||
* Multiple methods can be used in the same dependency constraint.
|
||||
*
|
||||
* If the format of any part of the the dependency node does not match one
|
||||
* If the format of any part of the dependency node does not match one
|
||||
* of these formats, an exception will be thrown.
|
||||
*
|
||||
* @param rootSchema The Schema instance, and root subschema, through
|
||||
@ -6623,7 +6623,7 @@ private:
|
||||
{
|
||||
constraints::LinearItemsConstraint constraint;
|
||||
|
||||
// Construct a Schema object for the the additionalItems constraint,
|
||||
// Construct a Schema object for the additionalItems constraint,
|
||||
// if the additionalItems property is present
|
||||
if (additionalItems) {
|
||||
if (additionalItems->maybeBool()) {
|
||||
@ -6802,7 +6802,7 @@ private:
|
||||
* @brief Make a new MaxItemsConstraint object.
|
||||
*
|
||||
* @param node JSON node containing an integer value representing the
|
||||
* maximum number of items that may be contaned by an array.
|
||||
* maximum number of items that may be contained by an array.
|
||||
*
|
||||
* @return pointer to a new MaxItemsConstraint that belongs to the caller.
|
||||
*/
|
||||
@ -8121,7 +8121,7 @@ public:
|
||||
// The apply() function will iterate over all constraints in the
|
||||
// schema, even if the callback function returns false. Once
|
||||
// iteration is complete, the apply() function will return true
|
||||
// only if all invokations of the callback function returned true.
|
||||
// only if all invocations of the callback function returned true.
|
||||
if (!subschema.apply(fn)) {
|
||||
return false;
|
||||
}
|
||||
@ -8134,7 +8134,7 @@ public:
|
||||
* @brief Validate a value against an AllOfConstraint
|
||||
*
|
||||
* An allOf constraint provides a set of child schemas against which the
|
||||
* target must be validated in order for the constraint to the satifisfied.
|
||||
* target must be validated in order for the constraint to the satisfied.
|
||||
*
|
||||
* When a ValidationResults object has been set via the 'results' member
|
||||
* variable, validation will proceed as long as no fatal errors occur,
|
||||
@ -8162,7 +8162,7 @@ public:
|
||||
*
|
||||
* An anyOf constraint provides a set of child schemas, any of which the
|
||||
* target may be validated against in order for the constraint to the
|
||||
* satifisfied.
|
||||
* satisfied.
|
||||
*
|
||||
* Because an anyOf constraint does not require the target to validate
|
||||
* against all child schemas, if validation against a single schema fails,
|
||||
@ -8201,7 +8201,7 @@ public:
|
||||
*
|
||||
* A conditional constraint allows a document to be validated against one of two additional
|
||||
* subschemas (specified via 'then' or 'else' properties) depending on whether the document
|
||||
* satifies an optional subschema (specified via the 'if' property).
|
||||
* satisfies an optional subschema (specified via the 'if' property).
|
||||
*
|
||||
* @param constraint ConditionalConstraint that the current node must validate against
|
||||
*
|
||||
@ -8391,7 +8391,7 @@ public:
|
||||
// non-string values seems like the right thing to do, to avoid
|
||||
// this throwing an exception.
|
||||
//
|
||||
// Schemas that need tighter validation around 'format' constaints
|
||||
// Schemas that need tighter validation around 'format' constraints
|
||||
// should generally pair it with a 'type' constraint.
|
||||
//
|
||||
// Reference:
|
||||
@ -9801,7 +9801,7 @@ private:
|
||||
* The return value depends on whether a given schema validates, with the
|
||||
* actual return value for a given case being decided at construction time.
|
||||
* The return value is used by the 'applyToSubschemas' functions in the
|
||||
* AllOfConstraint, AnyOfConstraint and OneOfConstrant classes to decide
|
||||
* AllOfConstraint, AnyOfConstraint and OneOfConstraint classes to decide
|
||||
* whether to terminate early.
|
||||
*
|
||||
* The functor uses output parameters (provided at construction) to update
|
||||
@ -10228,7 +10228,7 @@ template <class ValueType> class NlohmannJsonObjectMemberIterator
|
||||
}
|
||||
|
||||
private:
|
||||
/// Iternal copy of the original NlohmannJson iterator
|
||||
/// Internal copy of the original NlohmannJson iterator
|
||||
nlohmann::json::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -45,11 +45,11 @@
|
||||
#
|
||||
# if defined __clang_major__
|
||||
# if (__clang_major__ == 3 && __clang_minor__ >= 5)
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# elif (__clang_major__ > 3)
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# define TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# endif
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_
|
||||
# define TR2_OPTIONAL_CLANG_3_4_2_AND_HIGHER_
|
||||
# elif (__clang_major__ == 3 && __clang_minor__ == 4 && __clang_patchlevel__ >= 2)
|
||||
# define TR2_OPTIONAL_CLANG_3_4_2_AND_HIGHER_
|
||||
@ -85,7 +85,7 @@
|
||||
# define OPTIONAL_CONSTEXPR_INIT_LIST
|
||||
# endif
|
||||
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHTER_ && (defined __cplusplus) && (__cplusplus != 201103L)
|
||||
# if defined TR2_OPTIONAL_CLANG_3_5_AND_HIGHER_ && (defined __cplusplus) && (__cplusplus != 201103L)
|
||||
# define OPTIONAL_HAS_MOVE_ACCESSORS 1
|
||||
# else
|
||||
# define OPTIONAL_HAS_MOVE_ACCESSORS 0
|
||||
|
@ -268,7 +268,7 @@ public:
|
||||
: m_value(emptyObject()) { }
|
||||
|
||||
/**
|
||||
* @brief Construct a BoostJsonValue for for a specific Boost.JSON value
|
||||
* @brief Construct a BoostJsonValue for a specific Boost.JSON value
|
||||
*/
|
||||
BoostJsonValue(const boost::json::value &value)
|
||||
: m_value(value) { }
|
||||
@ -673,7 +673,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original Boost.JSON iterator
|
||||
/// Internal copy of the original Boost.JSON iterator
|
||||
boost::json::object::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -660,7 +660,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original Json11 iterator
|
||||
/// Internal copy of the original Json11 iterator
|
||||
json11::Json::object::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -664,7 +664,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original JsonCpp iterator
|
||||
/// Internal copy of the original JsonCpp iterator
|
||||
Json::ValueConstIterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -221,7 +221,7 @@ template <class ValueType> class NlohmannJsonObjectMemberIterator
|
||||
}
|
||||
|
||||
private:
|
||||
/// Iternal copy of the original NlohmannJson iterator
|
||||
/// Internal copy of the original NlohmannJson iterator
|
||||
nlohmann::json::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -676,7 +676,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original PicoJson iterator
|
||||
/// Internal copy of the original PicoJson iterator
|
||||
picojson::object::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -665,7 +665,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original PocoJson iterator
|
||||
/// Internal copy of the original PocoJson iterator
|
||||
Poco::JSON::Object::ConstIterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -213,7 +213,7 @@ public:
|
||||
/**
|
||||
* @brief Make a copy of a Boost property tree POD value
|
||||
*
|
||||
* @param source string containing the POD vlaue
|
||||
* @param source string containing the POD value
|
||||
*/
|
||||
explicit PropertyTreeFrozenValue(const boost::property_tree::ptree::data_type &source)
|
||||
: m_value(source) { }
|
||||
|
@ -671,7 +671,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original QtJson iterator
|
||||
/// Internal copy of the original QtJson iterator
|
||||
QJsonObject::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -825,7 +825,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
/// Iternal copy of the original RapidJson iterator
|
||||
/// Internal copy of the original RapidJson iterator
|
||||
typename ValueType::ConstMemberIterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -638,7 +638,7 @@ class YamlCppObjectMemberIterator
|
||||
}
|
||||
|
||||
private:
|
||||
/// Iternal copy of the original YamlCpp iterator
|
||||
/// Internal copy of the original YamlCpp iterator
|
||||
YAML::Node::const_iterator m_itr;
|
||||
};
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
*
|
||||
* This function shall return a boolean value if the Adapter contains either
|
||||
* an actual boolean value, or one of the strings 'true' or 'false'.
|
||||
* The string comparison is case sensitive.
|
||||
* The string comparison is case-sensitive.
|
||||
*
|
||||
* An exception shall be thrown if the value cannot be cast to a boolean.
|
||||
*
|
||||
@ -81,7 +81,7 @@ public:
|
||||
*
|
||||
* This function shall retrieve a boolean value if the Adapter contains
|
||||
* either an actual boolean value, or one of the strings 'true' or 'false'.
|
||||
* The string comparison is case sensitive.
|
||||
* The string comparison is case-sensitive.
|
||||
*
|
||||
* The retrieved value is returned via reference.
|
||||
*
|
||||
|
@ -133,7 +133,7 @@ inline std::string extractReferenceToken(std::string::const_iterator begin,
|
||||
* at least one character in length to be considered valid.
|
||||
*
|
||||
* Once the next reference token has been identified, it will be used either as
|
||||
* an array index or as an the name an object member. The validity of a
|
||||
* an array index or as the name of an object member. The validity of a
|
||||
* reference token depends on the type of the node currently being traversed,
|
||||
* and the applicability of the token to that node. For example, an array can
|
||||
* only be dereferenced by a non-negative integral index.
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
void addConstraintToSubschema(const Constraint &constraint,
|
||||
const Subschema *subschema)
|
||||
{
|
||||
// TODO: Check heirarchy for subschemas that do not belong...
|
||||
// TODO: Check hierarchy for subschemas that do not belong...
|
||||
|
||||
mutableSubschema(subschema)->addConstraint(constraint);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Add a custom contraint to this SchemaParser
|
||||
* @brief Add a custom constraint to this SchemaParser
|
||||
|
||||
* @param key name that will be used to identify relevant constraints
|
||||
* while parsing a schema document
|
||||
@ -390,7 +390,7 @@ private:
|
||||
// visited before arriving at the current node
|
||||
updateSchemaCache(schemaCache, newCacheKeys, subschema);
|
||||
|
||||
// Schema cache did not contain a pre-existing schema corresponding
|
||||
// Schema cache did not contain a preexisting schema corresponding
|
||||
// to the current node, so the schema that was returned will need
|
||||
// to be populated
|
||||
if (!cachedPtr) {
|
||||
@ -1306,11 +1306,11 @@ private:
|
||||
* When parsing a Draft 3 schema, in addition to the formats above, the
|
||||
* following format can be used:
|
||||
* - a string that names a single property that must be present if the
|
||||
* dependent property is presnet
|
||||
* dependent property is present
|
||||
*
|
||||
* Multiple methods can be used in the same dependency constraint.
|
||||
*
|
||||
* If the format of any part of the the dependency node does not match one
|
||||
* If the format of any part of the dependency node does not match one
|
||||
* of these formats, an exception will be thrown.
|
||||
*
|
||||
* @param rootSchema The Schema instance, and root subschema, through
|
||||
@ -1494,7 +1494,7 @@ private:
|
||||
{
|
||||
constraints::LinearItemsConstraint constraint;
|
||||
|
||||
// Construct a Schema object for the the additionalItems constraint,
|
||||
// Construct a Schema object for the additionalItems constraint,
|
||||
// if the additionalItems property is present
|
||||
if (additionalItems) {
|
||||
if (additionalItems->maybeBool()) {
|
||||
@ -1673,7 +1673,7 @@ private:
|
||||
* @brief Make a new MaxItemsConstraint object.
|
||||
*
|
||||
* @param node JSON node containing an integer value representing the
|
||||
* maximum number of items that may be contaned by an array.
|
||||
* maximum number of items that may be contained by an array.
|
||||
*
|
||||
* @return pointer to a new MaxItemsConstraint that belongs to the caller.
|
||||
*/
|
||||
|
@ -325,7 +325,7 @@ private:
|
||||
/// Schema description (optional)
|
||||
opt::optional<std::string> m_description;
|
||||
|
||||
/// Id to apply when resolving the schema URI
|
||||
/// ID to apply when resolving the schema URI
|
||||
opt::optional<std::string> m_id;
|
||||
|
||||
/// Title string associated with the schema (optional)
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
// The apply() function will iterate over all constraints in the
|
||||
// schema, even if the callback function returns false. Once
|
||||
// iteration is complete, the apply() function will return true
|
||||
// only if all invokations of the callback function returned true.
|
||||
// only if all invocations of the callback function returned true.
|
||||
if (!subschema.apply(fn)) {
|
||||
return false;
|
||||
}
|
||||
@ -108,7 +108,7 @@ public:
|
||||
* @brief Validate a value against an AllOfConstraint
|
||||
*
|
||||
* An allOf constraint provides a set of child schemas against which the
|
||||
* target must be validated in order for the constraint to the satifisfied.
|
||||
* target must be validated in order for the constraint to the satisfied.
|
||||
*
|
||||
* When a ValidationResults object has been set via the 'results' member
|
||||
* variable, validation will proceed as long as no fatal errors occur,
|
||||
@ -136,7 +136,7 @@ public:
|
||||
*
|
||||
* An anyOf constraint provides a set of child schemas, any of which the
|
||||
* target may be validated against in order for the constraint to the
|
||||
* satifisfied.
|
||||
* satisfied.
|
||||
*
|
||||
* Because an anyOf constraint does not require the target to validate
|
||||
* against all child schemas, if validation against a single schema fails,
|
||||
@ -175,7 +175,7 @@ public:
|
||||
*
|
||||
* A conditional constraint allows a document to be validated against one of two additional
|
||||
* subschemas (specified via 'then' or 'else' properties) depending on whether the document
|
||||
* satifies an optional subschema (specified via the 'if' property).
|
||||
* satisfies an optional subschema (specified via the 'if' property).
|
||||
*
|
||||
* @param constraint ConditionalConstraint that the current node must validate against
|
||||
*
|
||||
@ -365,7 +365,7 @@ public:
|
||||
// non-string values seems like the right thing to do, to avoid
|
||||
// this throwing an exception.
|
||||
//
|
||||
// Schemas that need tighter validation around 'format' constaints
|
||||
// Schemas that need tighter validation around 'format' constraints
|
||||
// should generally pair it with a 'type' constraint.
|
||||
//
|
||||
// Reference:
|
||||
@ -1775,7 +1775,7 @@ private:
|
||||
* The return value depends on whether a given schema validates, with the
|
||||
* actual return value for a given case being decided at construction time.
|
||||
* The return value is used by the 'applyToSubschemas' functions in the
|
||||
* AllOfConstraint, AnyOfConstraint and OneOfConstrant classes to decide
|
||||
* AllOfConstraint, AnyOfConstraint and OneOfConstraint classes to decide
|
||||
* whether to terminate early.
|
||||
*
|
||||
* The functor uses output parameters (provided at construction) to update
|
||||
|
@ -36,7 +36,7 @@ endif()
|
||||
if (APPLE)
|
||||
set_source_files_properties(${ICON_FILE} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||
|
||||
# Identify MacOS bundle
|
||||
# Identify macOS bundle
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION})
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING ${PROJECT_VERSION})
|
||||
|
@ -122,6 +122,6 @@ TEST(valijson, valijson_be_robust_against_catastrophic_backtracking_regular_expr
|
||||
Validator validator;
|
||||
RapidJsonAdapter myTargetAdapter(myTargetDoc);
|
||||
|
||||
//payload is correct regarding the regexp but evaluation is impossible due to catastrophic regexp bactracking. so we return false.
|
||||
//payload is correct regarding the regexp but evaluation is impossible due to catastrophic regexp backtracking. so we return false.
|
||||
ASSERT_FALSE(validator.validate(mySchema, myTargetAdapter, nullptr));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user