github.com/datreeio/datree@v1.9.22-rc/pkg/jsonSchemaValidator/test_fixtures/invalid-rego-definition-code.json (about) 1 { 2 "if": { 3 "properties": { 4 "kind": { 5 "type": "string", 6 "enum": [ 7 "Deployment" 8 ] 9 } 10 } 11 }, 12 "then": { 13 "regoDefinition": { 14 "libs": [ 15 "package lib.helpers\ncheck_if_missing(missing) = isMissing {\n isMissing := count(missing) > 0\n }\n" 16 ], 17 "code": "import data.lib.helpers\n\nviolation[labelIsMissing] {\nprovided := {label | input.metadata.labels[label]}\nrequired := {\"billing\"}\nmissing := required - provided\nlabelIsMissing := helpers.check_if_missing(missing)\n}\n" 18 } 19 } 20 }