Lines Matching refs:schema

43 static bool ucl_schema_validate (const ucl_object_t *schema,
140 ucl_schema_validate_object (const ucl_object_t *schema,
151 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
176 "additionalProperties attribute is invalid in schema");
187 "required attribute is invalid in schema");
237 /* Check if we have exactly the same properties in schema and object */
239 prop = ucl_object_lookup (schema, "properties");
245 pat = ucl_object_lookup (schema, "patternProperties");
291 ucl_schema_validate_number (const ucl_object_t *schema,
300 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
322 test = ucl_object_lookup (schema, "exclusiveMaximum");
338 test = ucl_object_lookup (schema, "exclusiveMinimum");
357 ucl_schema_validate_string (const ucl_object_t *schema,
368 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
471 ucl_schema_validate_array (const ucl_object_t *schema,
483 while (ret && (elt = ucl_object_iterate (schema, &iter, true)) != NULL) {
500 /* Validate all items using the specified schema */
508 "items attribute is invalid in schema");
526 "additionalItems attribute is invalid in schema");
617 "Type attribute is invalid in schema");
725 * Find reference schema
870 ucl_schema_validate_values (const ucl_object_t *schema, const ucl_object_t *obj,
876 elt = ucl_object_lookup (schema, "maxValues");
892 elt = ucl_object_lookup (schema, "minValues");
916 ucl_schema_validate (const ucl_object_t *schema,
926 if (schema->type != UCL_OBJECT) {
927 ucl_schema_create_error (err, UCL_SCHEMA_INVALID_SCHEMA, schema,
928 "schema is %s instead of object",
929 ucl_object_type_to_string (schema->type));
937 if (!ucl_schema_validate_values (schema, obj, err)) {
941 if (!ucl_schema_validate (schema, cur, false, err, root, external_refs)) {
948 elt = ucl_object_lookup (schema, "enum");
955 elt = ucl_object_lookup (schema, "allOf");
966 elt = ucl_object_lookup (schema, "anyOf");
984 elt = ucl_object_lookup (schema, "oneOf");
1002 elt = ucl_object_lookup (schema, "not");
1013 elt = ucl_object_lookup (schema, "$ref");
1028 elt = ucl_object_lookup (schema, "type");
1035 return ucl_schema_validate_object (schema, obj, err, root, external_refs);
1038 return ucl_schema_validate_array (schema, obj, err, root, external_refs);
1042 return ucl_schema_validate_number (schema, obj, err);
1045 return ucl_schema_validate_string (schema, obj, err);
1055 ucl_object_validate (const ucl_object_t *schema,
1058 return ucl_object_validate_root_ext (schema, obj, schema, NULL, err);
1062 ucl_object_validate_root (const ucl_object_t *schema,
1067 return ucl_object_validate_root_ext (schema, obj, root, NULL, err);
1071 ucl_object_validate_root_ext (const ucl_object_t *schema,
1084 ret = ucl_schema_validate (schema, obj, true, err, root, ext_refs);