Skip to content

Commit

Permalink
update validation for inference rule (#1256)
Browse files Browse the repository at this point in the history
* update validation for inference rule

* handle headOption.get operation in DynamicRuleValidator

* use unknown as default value

* Revert "use unknown as default value"

This reverts commit 557167d.

* Revert "handle headOption.get operation in DynamicRuleValidator"

This reverts commit 9dbe52c.
  • Loading branch information
khemrajrathore authored Aug 19, 2024
1 parent 0abbf9f commit efafc2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"code",
"method_full_name"
],
"pattern": "^(code|method_full_name|method_full_name_with_literal|method_full_name_with_property_name)$"
"pattern": "^(code|method_full_name|method_full_name_with_literal|method_full_name_with_property_name|endpoint_domain_with_literal|endpoint_domain_with_property_name)$"
},
"domains": {
"$id": "#root/inferences/items/domains",
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/ai/privado/model/PrivadoTag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ object ConfigRuleType extends Enumeration {
}

object FilterProperty extends Enumeration {
// TODO When we update the Filter Property also update the validation regex at
// src/main/resources/ai/privado/rulevalidator/schema/inferences.json
type FilterProperty = Value
val METHOD_FULL_NAME: model.FilterProperty.Value = Value("method_full_name")
val CODE: model.FilterProperty.Value = Value("code")
Expand Down

0 comments on commit efafc2c

Please sign in to comment.