Remove query parameter from policy endpoints (#1527)

This commit is contained in:
Yury Gargay 2024-02-05 14:07:11 +01:00 committed by GitHub
parent a2f2a6e21a
commit bdf71ab7ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 14 deletions

View File

@ -765,15 +765,10 @@ components:
description: Policy status
type: boolean
example: true
query:
description: Policy Rego query
type: string
example: "package netbird\\n\\nall[rule] {\\n is_peer_in_any_group([\\\"ch8i4ug6lnn4g9hqv7m0\\\",\\\"ch8i4ug6lnn4g9hqv7m0\\\"])\\n rule := {\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"dst\\\", \\\"accept\\\", \\\"\\\"),\\n rules_from_group(\\\"ch8i4ug6lnn4g9hqv7m0\\\", \\\"src\\\", \\\"accept\\\", \\\"\\\"),\\n }[_][_]\\n}\\n"
required:
- name
- description
- enabled
- query
PolicyUpdate:
allOf:
- $ref: '#/components/schemas/PolicyMinimum'

View File

@ -567,9 +567,6 @@ type Policy struct {
// Name Policy name identifier
Name string `json:"name"`
// Query Policy Rego query
Query string `json:"query"`
// Rules Policy rule object for policy UI editor
Rules []PolicyRule `json:"rules"`
}
@ -587,9 +584,6 @@ type PolicyMinimum struct {
// Name Policy name identifier
Name string `json:"name"`
// Query Policy Rego query
Query string `json:"query"`
}
// PolicyRule defines model for PolicyRule.
@ -717,9 +711,6 @@ type PolicyUpdate struct {
// Name Policy name identifier
Name string `json:"name"`
// Query Policy Rego query
Query string `json:"query"`
// Rules Policy rule object for policy UI editor
Rules []PolicyRuleUpdate `json:"rules"`
}