Skip to content

Commit 2838cfc

Browse files
committed
Update network policy struct
1 parent 5c30f98 commit 2838cfc

File tree

2 files changed

+200
-76
lines changed

2 files changed

+200
-76
lines changed

apispec/api.gen.go

Lines changed: 190 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apispec/api.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@ components:
565565
cidr_mode:
566566
type: string
567567
enum:
568+
- none
568569
- bypass
569570
- alert
570571
- enforce
@@ -573,12 +574,14 @@ components:
573574
cidr_policy:
574575
type: string
575576
enum:
577+
- none
576578
- allow
577579
- deny
578580
description: Default policy for CIDR traffic.
579581
resolve_mode:
580582
type: string
581583
enum:
584+
- none
582585
- bypass
583586
- alert
584587
- enforce
@@ -587,6 +590,7 @@ components:
587590
resolve_policy:
588591
type: string
589592
enum:
593+
- none
590594
- allow
591595
- deny
592596
description: Default policy for domain resolution.
@@ -595,31 +599,25 @@ components:
595599
items:
596600
type: object
597601
properties:
598-
type:
599-
type: string
600-
enum:
601-
- CIDR
602-
- Domain
603-
description: "The type of rule, either CIDR or Domain."
604602
cidr:
605603
type: string
606-
description: CIDR range for the rule (if type is CIDR).
604+
description: CIDR range for the rule (if applicable).
607605
domain:
608606
type: string
609-
description: Domain for the rule (if type is Domain).
607+
description: Domain for the rule (if applicable).
610608
policy:
611609
type: string
612610
enum:
611+
- none
613612
- allow
614613
- deny
615614
description: Policy for the rule.
616-
required:
617-
- type
618-
- policy
615+
oneOf:
616+
- required: [cidr, policy]
617+
- required: [domain, policy]
619618
description: List of network policy rules.
620619
required:
621620
- cidr_mode
622621
- cidr_policy
623622
- resolve_mode
624623
- resolve_policy
625-
- rules

0 commit comments

Comments
 (0)