mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-27 00:09:34 +01:00
Remove query parameter from policy endpoints (#1527)
This commit is contained in:
parent
a2f2a6e21a
commit
bdf71ab7ff
@ -765,15 +765,10 @@ components:
|
|||||||
description: Policy status
|
description: Policy status
|
||||||
type: boolean
|
type: boolean
|
||||||
example: true
|
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:
|
required:
|
||||||
- name
|
- name
|
||||||
- description
|
- description
|
||||||
- enabled
|
- enabled
|
||||||
- query
|
|
||||||
PolicyUpdate:
|
PolicyUpdate:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/PolicyMinimum'
|
- $ref: '#/components/schemas/PolicyMinimum'
|
||||||
|
@ -567,9 +567,6 @@ type Policy struct {
|
|||||||
// Name Policy name identifier
|
// Name Policy name identifier
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Query Policy Rego query
|
|
||||||
Query string `json:"query"`
|
|
||||||
|
|
||||||
// Rules Policy rule object for policy UI editor
|
// Rules Policy rule object for policy UI editor
|
||||||
Rules []PolicyRule `json:"rules"`
|
Rules []PolicyRule `json:"rules"`
|
||||||
}
|
}
|
||||||
@ -587,9 +584,6 @@ type PolicyMinimum struct {
|
|||||||
|
|
||||||
// Name Policy name identifier
|
// Name Policy name identifier
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Query Policy Rego query
|
|
||||||
Query string `json:"query"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PolicyRule defines model for PolicyRule.
|
// PolicyRule defines model for PolicyRule.
|
||||||
@ -717,9 +711,6 @@ type PolicyUpdate struct {
|
|||||||
// Name Policy name identifier
|
// Name Policy name identifier
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
// Query Policy Rego query
|
|
||||||
Query string `json:"query"`
|
|
||||||
|
|
||||||
// Rules Policy rule object for policy UI editor
|
// Rules Policy rule object for policy UI editor
|
||||||
Rules []PolicyRuleUpdate `json:"rules"`
|
Rules []PolicyRuleUpdate `json:"rules"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user