json/schema: add exclusiveMin/Max
This commit is contained in:
parent
d48e36ffd5
commit
0629ba07cd
@ -33,6 +33,8 @@ base::instantiate (std::string const &name, ::json::tree::node const &def)
|
|||||||
if (name == "minLength") return std::make_unique<min_length> (def);
|
if (name == "minLength") return std::make_unique<min_length> (def);
|
||||||
if (name == "maxLength") return std::make_unique<max_length> (def);
|
if (name == "maxLength") return std::make_unique<max_length> (def);
|
||||||
if (name == "minimum") return std::make_unique<minimum> (def);
|
if (name == "minimum") return std::make_unique<minimum> (def);
|
||||||
|
if (name == "exclusiveMaximum") return std::make_unique<exclusive_maximum> (def);
|
||||||
|
if (name == "exclusiveMinimum") return std::make_unique<exclusive_minimum> (def);
|
||||||
if (name == "maximum") return std::make_unique<maximum> (def);
|
if (name == "maximum") return std::make_unique<maximum> (def);
|
||||||
if (name == "properties") return std::make_unique<properties> (def);
|
if (name == "properties") return std::make_unique<properties> (def);
|
||||||
if (name == "patternProperties") return std::make_unique<pattern_properties> (def);
|
if (name == "patternProperties") return std::make_unique<pattern_properties> (def);
|
||||||
|
@ -73,3 +73,5 @@ inequality<ComparatorT>::describe (std::ostream &os) const
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
template class util::json::schema::constraint::inequality<std::less_equal>;
|
template class util::json::schema::constraint::inequality<std::less_equal>;
|
||||||
template class util::json::schema::constraint::inequality<std::greater_equal>;
|
template class util::json::schema::constraint::inequality<std::greater_equal>;
|
||||||
|
template class util::json::schema::constraint::inequality<std::less>;
|
||||||
|
template class util::json::schema::constraint::inequality<std::greater>;
|
||||||
|
@ -46,4 +46,6 @@ namespace util::json::schema::constraint {
|
|||||||
|
|
||||||
using minimum = inequality<std::greater_equal>;
|
using minimum = inequality<std::greater_equal>;
|
||||||
using maximum = inequality<std::less_equal>;
|
using maximum = inequality<std::less_equal>;
|
||||||
|
using exclusive_minimum = inequality<std::greater>;
|
||||||
|
using exclusive_maximum = inequality<std::less>;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
3
|
@ -0,0 +1 @@
|
|||||||
|
4
|
@ -0,0 +1 @@
|
|||||||
|
{ "type": "integer", "exclusiveMinimum": 3 }
|
@ -0,0 +1 @@
|
|||||||
|
4
|
@ -0,0 +1 @@
|
|||||||
|
3
|
@ -0,0 +1 @@
|
|||||||
|
2
|
@ -0,0 +1 @@
|
|||||||
|
{ "type": "integer", "exclusiveMaximum": 3 }
|
Loading…
Reference in New Issue
Block a user