Skip to content

Commit

Permalink
fix(userspace/engine): improve rule json schema to account for `sourc…
Browse files Browse the repository at this point in the history
…e` and `required_plugin_versions`.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Sep 17, 2024
1 parent 6b634df commit d36d7ee
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion userspace/engine/rule_json_schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ const char rule_schema_string[] = LONG_STRING_CONST(
"required_engine_version": {
"type": "string"
},
"required_plugin_versions": {
"type": "array",
"items": {
"$ref": "#/definitions/RequiredPluginVersion"
}
},
"macro": {
"type": "string"
},
Expand Down Expand Up @@ -68,6 +74,9 @@ const char rule_schema_string[] = LONG_STRING_CONST(
"priority": {
"$ref": "#/definitions/Priority"
},
"source": {
"type": "string"
},
"exceptions": {
"type": "array",
"items": {
Expand Down Expand Up @@ -166,7 +175,47 @@ const char rule_schema_string[] = LONG_STRING_CONST(
},
"minProperties": 1,
"title": "Override"
}
},
"RequiredPluginVersion": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"alternatives": {
"type": "array",
"items": {
"$ref": "#/definitions/Alternative"
}
}
},
"required": [
"name",
"version"
],
"title": "RequiredPluginVersion"
},
"Alternative": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
],
"title": "Alternative"
}
}
}

Expand Down

0 comments on commit d36d7ee

Please sign in to comment.