xref: /openbmc/libcper/include/libcper/json-schema.h (revision 4bdb2261d1299129c046dfb6c4c546fa30224023)
1 #ifndef CPER_JSON_SCHEMA_H
2 #define CPER_JSON_SCHEMA_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <json.h>
9 
10 #define JSON_SCHEMA_VERSION    "https://json-schema.org/draft/2020-12/schema"
11 #define JSON_ERROR_MSG_MAX_LEN 512
12 
13 int validate_schema(json_object *schema, char *schema_directory,
14 		    json_object *object, char *error_message);
15 int validate_schema_from_file(const char *schema_file, json_object *object,
16 			      char *error_message);
17 
18 #ifdef __cplusplus
19 }
20 #endif
21 
22 #endif
23