Skip to content

Commit

Permalink
fix(rules-engine): allow custom action in the rulesets schema (#2516)
Browse files Browse the repository at this point in the history
## Proposed change

Today if we create a custom action handler, we can't write a
`rulesets.json` validating the schema exposed.
  • Loading branch information
matthieu-crouzet authored Nov 27, 2024
2 parents 8dd1971 + 68eda6b commit ebfb189
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/@o3r/rules-engine/schemas/rulesets.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,31 @@
},
{
"$ref": "https://raw.githubusercontent.com/AmadeusITGroup/otter/main/packages/%40o3r/components/schemas/rules-engine.placeholder-action.schema.json"
},
{
"$ref": "#/definitions/RulesEngineCustomActionBlock"
}
]
}
]
},
"RulesEngineCustomActionBlock": {
"type": "object",
"description": "Content of a custom action",
"properties": {
"actionType": {
"type": "string",
"description": "Action Type",
"pattern": "^(?!(?:SET_FACT|UPDATE_PLACEHOLDER|UPDATE_CONFIG|UPDATE_ASSET|UPDATE_LOCALISATION)$).*$"
},
"value": {}
},
"additionalItems": true,
"required": [
"actionType",
"value"
]
},
"RulesActionSetTemporaryFactBlock": {
"type": "object",
"description": "Content of action that updates the runtime facts",
Expand Down

0 comments on commit ebfb189

Please sign in to comment.