Lines Matching refs:schema

43 static bool ucl_schema_validate (const ucl_object_t *schema,
198 ucl_schema_validate_object (const ucl_object_t *schema,
208 while (ret && (elt = ucl_iterate_object (schema, &iter, true)) != NULL) {
232 "additionalProperties attribute is invalid in schema");
243 "required attribute is invalid in schema");
286 /* Check if we have exactly the same properties in schema and object */
288 prop = ucl_object_find_key (schema, "properties");
294 pat = ucl_object_find_key (schema, "patternProperties");
339 ucl_schema_validate_number (const ucl_object_t *schema,
348 while (ret && (elt = ucl_iterate_object (schema, &iter, true)) != NULL) {
370 test = ucl_object_find_key (schema, "exclusiveMaximum");
386 test = ucl_object_find_key (schema, "exclusiveMinimum");
405 ucl_schema_validate_string (const ucl_object_t *schema,
416 while (ret && (elt = ucl_iterate_object (schema, &iter, true)) != NULL) {
519 ucl_schema_validate_array (const ucl_object_t *schema,
529 while (ret && (elt = ucl_iterate_object (schema, &iter, true)) != NULL) {
545 /* Validate all items using the specified schema */
552 "items attribute is invalid in schema");
570 "additionalItems attribute is invalid in schema");
661 "Type attribute is invalid in schema");
769 * Find reference schema
831 ucl_schema_validate_values (const ucl_object_t *schema, const ucl_object_t *obj,
837 elt = ucl_object_find_key (schema, "maxValues");
853 elt = ucl_object_find_key (schema, "minValues");
877 ucl_schema_validate (const ucl_object_t *schema,
886 if (schema->type != UCL_OBJECT) {
887 ucl_schema_create_error (err, UCL_SCHEMA_INVALID_SCHEMA, schema,
888 "schema is %s instead of object", ucl_object_type_to_string (schema->type));
896 if (!ucl_schema_validate_values (schema, obj, err)) {
900 if (!ucl_schema_validate (schema, cur, false, err, root)) {
907 elt = ucl_object_find_key (schema, "enum");
914 elt = ucl_object_find_key (schema, "allOf");
925 elt = ucl_object_find_key (schema, "anyOf");
943 elt = ucl_object_find_key (schema, "oneOf");
961 elt = ucl_object_find_key (schema, "not");
972 elt = ucl_object_find_key (schema, "$ref");
983 elt = ucl_object_find_key (schema, "type");
990 return ucl_schema_validate_object (schema, obj, err, root);
993 return ucl_schema_validate_array (schema, obj, err, root);
997 return ucl_schema_validate_number (schema, obj, err);
1000 return ucl_schema_validate_string (schema, obj, err);
1010 ucl_object_validate (const ucl_object_t *schema,
1013 return ucl_schema_validate (schema, obj, true, err, schema);