mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
ast: Adding rego.metadata.* built-in functions (#4537)
New functions: * rego.metadata.chain(): returns the chain of metadata, starting from the active rule, going outward * rego.metadata.rule(): returns the metadata for the active rule Signed-off-by: Johan Fylling <johan.dev@fylling.se>
This commit is contained in:
@@ -2856,6 +2856,27 @@
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rego.metadata.chain",
|
||||
"decl": {
|
||||
"result": {
|
||||
"dynamic": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rego.metadata.rule",
|
||||
"decl": {
|
||||
"result": {
|
||||
"type": "any"
|
||||
},
|
||||
"type": "function"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rego.parse_module",
|
||||
"decl": {
|
||||
|
||||
Reference in New Issue
Block a user