Lines Matching defs:schema

43 static bool ucl_schema_validate (const ucl_object_t *schema,
135 ucl_schema_validate_object (const ucl_object_t *schema,
146 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
171 "additionalProperties attribute is invalid in schema");
182 "required attribute is invalid in schema");
227 /* Check if we have exactly the same properties in schema and object */
229 prop = ucl_object_lookup (schema, "properties");
235 pat = ucl_object_lookup (schema, "patternProperties");
281 ucl_schema_validate_number (const ucl_object_t *schema,
290 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
312 test = ucl_object_lookup (schema, "exclusiveMaximum");
328 test = ucl_object_lookup (schema, "exclusiveMinimum");
347 ucl_schema_validate_string (const ucl_object_t *schema,
358 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
461 ucl_schema_validate_array (const ucl_object_t *schema,
473 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
490 /* Validate all items using the specified schema */
498 "items attribute is invalid in schema");
516 "additionalItems attribute is invalid in schema");
607 "Type attribute is invalid in schema");
715 * Find reference schema
860 ucl_schema_validate_values (const ucl_object_t *schema, const ucl_object_t *obj,
866 elt = ucl_object_lookup (schema, "maxValues");
882 elt = ucl_object_lookup (schema, "minValues");
906 ucl_schema_validate (const ucl_object_t *schema,
916 if (schema->type != UCL_OBJECT) {
917 ucl_schema_create_error (err, UCL_SCHEMA_INVALID_SCHEMA, schema,
918 "schema is %s instead of object",
919 ucl_object_type_to_string (schema->type));
927 if (!ucl_schema_validate_values (schema, obj, err)) {
931 if (!ucl_schema_validate (schema, cur, false, err, root, external_refs)) {
938 elt = ucl_object_lookup (schema, "enum");
945 elt = ucl_object_lookup (schema, "allOf");
956 elt = ucl_object_lookup (schema, "anyOf");
974 elt = ucl_object_lookup (schema, "oneOf");
992 elt = ucl_object_lookup (schema, "not");
1003 elt = ucl_object_lookup (schema, "$ref");
1018 elt = ucl_object_lookup (schema, "type");
1025 return ucl_schema_validate_object (schema, obj, err, root, external_refs);
1028 return ucl_schema_validate_array (schema, obj, err, root, external_refs);
1032 return ucl_schema_validate_number (schema, obj, err);
1035 return ucl_schema_validate_string (schema, obj, err);
1045 ucl_object_validate (const ucl_object_t *schema,
1048 return ucl_object_validate_root_ext (schema, obj, schema, NULL, err);
1052 ucl_object_validate_root (const ucl_object_t *schema,
1057 return ucl_object_validate_root_ext (schema, obj, root, NULL, err);
1061 ucl_object_validate_root_ext (const ucl_object_t *schema,
1074 ret = ucl_schema_validate (schema, obj, true, err, root, ext_refs);