Skip to content

Commit

Permalink
refactor: oneOf for v1beta3
Browse files Browse the repository at this point in the history
Signed-off-by: KevFan <[email protected]>
  • Loading branch information
KevFan committed Oct 1, 2024
1 parent ebe9c80 commit 7df9885
Show file tree
Hide file tree
Showing 2 changed files with 446 additions and 0 deletions.
214 changes: 214 additions & 0 deletions install/crd/patches/oneof_in_authconfigs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,220 @@
# Enables oneOf validation for the identity/authentication, metadata, authorization, and response fields.

# v1beta2
- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/authentication/additionalProperties/oneOf
value:
- properties:
credentials: {}
oauth2Introspection: {}
required: [oauth2Introspection]
- properties:
credentials: {}
jwt: {}
required: [jwt]
- properties:
credentials: {}
apiKey: {}
required: [apiKey]
- properties:
credentials: {}
x509: {}
required: [x509]
- properties:
credentials: {}
kubernetesTokenReview: {}
required: [kubernetesTokenReview]
- properties:
credentials: {}
anonymous: {}
required: [anonymous]
- properties:
credentials: {}
plain: {}
required: [plain]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/metadata/additionalProperties/oneOf
value:
- properties:
userInfo: {}
required: [userInfo]
- properties:
uma: {}
required: [uma]
- properties:
http: {}
required: [http]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/authorization/additionalProperties/oneOf
value:
- properties:
opa: {}
required: [opa]
- properties:
patternMatching: {}
required: [patternMatching]
- properties:
kubernetesSubjectAccessReview: {}
required: [kubernetesSubjectAccessReview]
- properties:
spicedb: {}
required: [spicedb]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/response/properties/success/properties/headers/additionalProperties/oneOf
value:
- properties:
wristband: {}
required: [wristband]
- properties:
json: {}
required: [json]
- properties:
plain: {}
required: [plain]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/response/properties/success/properties/dynamicMetadata/additionalProperties/oneOf
value:
- properties:
wristband: {}
required: [wristband]
- properties:
json: {}
required: [json]
- properties:
plain: {}
required: [plain]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/authorization/additionalProperties/properties/patternMatching/properties/patterns/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/authentication/additionalProperties/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/metadata/additionalProperties/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/authorization/additionalProperties/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/response/properties/success/properties/headers/additionalProperties/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

- op: add
path: /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/response/properties/success/properties/dynamicMetadata/additionalProperties/properties/when/items/oneOf
value:
- properties:
patternRef: {}
required: [patternRef]
- properties:
operator: {}
selector: {}
value: {}
required: [operator, selector]
- properties:
all: {}
required: [all]
- properties:
any: {}
required: [any]

# v1beta3
- op: add
path: /spec/versions/1/schema/openAPIV3Schema/properties/spec/properties/authentication/additionalProperties/oneOf
value:
Expand Down
Loading

0 comments on commit 7df9885

Please sign in to comment.