Lines Matching defs:schema

43 static bool ucl_schema_validate (const ucl_object_t *schema,
149 ucl_schema_validate_object (const ucl_object_t *schema,
160 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
185 "additionalProperties attribute is invalid in schema");
196 "required attribute is invalid in schema");
246 /* Check if we have exactly the same properties in schema and object */
248 prop = ucl_object_lookup (schema, "properties");
253 pat = ucl_object_lookup (schema, "patternProperties");
304 ucl_schema_validate_number (const ucl_object_t *schema,
313 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
335 test = ucl_object_lookup (schema, "exclusiveMaximum");
351 test = ucl_object_lookup (schema, "exclusiveMinimum");
370 ucl_schema_validate_string (const ucl_object_t *schema,
381 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
484 ucl_schema_validate_array (const ucl_object_t *schema,
496 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
513 /* Validate all items using the specified schema */
521 "items attribute is invalid in schema");
539 "additionalItems attribute is invalid in schema");
630 "Type attribute is invalid in schema");
738 * Find reference schema
883 ucl_schema_validate_values (const ucl_object_t *schema, const ucl_object_t *obj,
889 elt = ucl_object_lookup (schema, "maxValues");
905 elt = ucl_object_lookup (schema, "minValues");
929 ucl_schema_validate (const ucl_object_t *schema,
939 if (schema->type != UCL_OBJECT) {
940 ucl_schema_create_error (err, UCL_SCHEMA_INVALID_SCHEMA, schema,
941 "schema is %s instead of object",
942 ucl_object_type_to_string (schema->type));
950 if (!ucl_schema_validate_values (schema, obj, err)) {
954 if (!ucl_schema_validate (schema, cur, false, err, root, external_refs)) {
961 elt = ucl_object_lookup (schema, "enum");
968 elt = ucl_object_lookup (schema, "allOf");
979 elt = ucl_object_lookup (schema, "anyOf");
997 elt = ucl_object_lookup (schema, "oneOf");
1015 elt = ucl_object_lookup (schema, "not");
1026 elt = ucl_object_lookup (schema, "$ref");
1041 elt = ucl_object_lookup (schema, "type");
1048 return ucl_schema_validate_object (schema, obj, err, root, external_refs);
1051 return ucl_schema_validate_array (schema, obj, err, root, external_refs);
1055 return ucl_schema_validate_number (schema, obj, err);
1058 return ucl_schema_validate_string (schema, obj, err);
1068 ucl_object_validate (const ucl_object_t *schema,
1071 return ucl_object_validate_root_ext (schema, obj, schema, NULL, err);
1075 ucl_object_validate_root (const ucl_object_t *schema,
1080 return ucl_object_validate_root_ext (schema, obj, root, NULL, err);
1084 ucl_object_validate_root_ext (const ucl_object_t *schema,
1097 ret = ucl_schema_validate (schema, obj, true, err, root, ext_refs);