Debian Codegraph @

src/keywords/legacy/minimum_draft_4.rs

raw symbols SCIP
1 use crate::{
2 compiler,
3 keywords::{minmax, CompilationResult},
4 };
5 use serde_json::{Map, Value};
6
7 #[inline]
8 pub(crate) fn compile<'a>(
9 ctx: &compiler::Context,
10 parent: &'a Map<String, Value>,
11 schema: &'a Value,
12 ) -> Option<CompilationResult<'a>> {
13 if let Some(Value::Bool(true)) = parent.get("exclusiveMinimum") {
14 minmax::compile_exclusive_minimum(ctx, parent, schema)
15 } else {
16 minmax::compile_minimum(ctx, parent, schema)
17 }
18 }