Lines Matching defs:schema
659 * @method parser:validate(schema)
660 * Validates the top object in the parser against schema. Schema might be
661 * another object or a string that represents file to load schema from.
663 * @param {string/table} schema input schema
671 ucl_object_t *schema;
679 schema = ucl_object_lua_import (L, 2);
681 if (schema == NULL) {
683 lua_pushstring (L, "cannot load schema from lua table");
694 lua_pushfstring (L, "cannot parse schema file \"%s\": "
701 schema = ucl_parser_get_object (schema_parser);
706 lua_pushstring (L, "invalid schema argument");
711 if (!ucl_object_validate (schema, parser->top_obj, &err)) {
721 ucl_object_unref (schema);
816 * @method object:validate(schema[, path[, ext_refs]])
817 * Validates the given ucl object using schema object represented as another
819 * specify the specific schema element to perform validation.
821 * @param {ucl.object} schema schema object
830 ucl_object_t *obj, *schema, *ext_refs = NULL;
837 schema = lua_ucl_object_get (L, 2);
839 if (schema && obj && ucl_object_type (schema) == UCL_OBJECT) {
863 schema_elt = ucl_object_lookup_path_char (schema, path, '/');
867 schema_elt = schema;
871 res = ucl_object_validate_root_ext (schema_elt, obj, schema,
903 lua_pushstring (L, "invalid object or schema");