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 authored and poiana committed Sep 17, 2024
1 parent 6b634df commit fa701dd
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions 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,6 +175,46 @@ 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 fa701dd

Please sign in to comment.