Created
September 29, 2020 12:01
-
-
Save sttts/0e111761714ed2af2bdd07b977161ce9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 0cefdb7c7aa6af140515b042bc1e1b0c7b03f78c | |
Author: Dr. Stefan Schimanski <stefan.schimanski@gmail.com> | |
Date: Tue Sep 29 14:00:56 2020 +0200 | |
Fix OpenAPI | |
diff --git a/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml b/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml | |
index 1d8e85be..b3bda333 100644 | |
--- a/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml | |
+++ b/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml | |
@@ -1,9 +1,9 @@ | |
-apiVersion: apiextensions.k8s.io/v1beta1 | |
+apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
- name: rangeallocations.security.internal.openshift.io | |
annotations: | |
include.release.openshift.io/self-managed-high-availability: "true" | |
+ name: rangeallocations.security.internal.openshift.io | |
spec: | |
group: security.internal.openshift.io | |
names: | |
@@ -12,37 +12,40 @@ spec: | |
plural: rangeallocations | |
singular: rangeallocation | |
scope: Cluster | |
- preserveUnknownFields: false | |
versions: | |
- name: v1 | |
+ schema: | |
+ openAPIV3Schema: | |
+ description: RangeAllocation is used so we can easily expose a RangeAllocation | |
+ typed for security group This is an internal API, not intended for external | |
+ consumption. | |
+ properties: | |
+ apiVersion: | |
+ description: 'APIVersion defines the versioned schema of this representation | |
+ of an object. Servers should convert recognized schemas to the latest | |
+ internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | |
+ type: string | |
+ data: | |
+ description: data is a byte array representing the serialized state of | |
+ a range allocation. It is a bitmap with each bit set to one to represent | |
+ a range is taken. | |
+ items: | |
+ description: A byte value, i.e. between 0 and 255 | |
+ maximum: 255 | |
+ minimum: 0 | |
+ type: integer | |
+ type: array | |
+ kind: | |
+ description: 'Kind is a string value representing the REST resource this | |
+ object represents. Servers may infer this from the endpoint the client | |
+ submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | |
+ type: string | |
+ metadata: | |
+ type: object | |
+ range: | |
+ description: range is a string representing a unique label for a range | |
+ of uids, "1000000000-2000000000/10000". | |
+ type: string | |
+ type: object | |
served: true | |
storage: true | |
- "validation": | |
- "openAPIV3Schema": | |
- description: RangeAllocation is used so we can easily expose a RangeAllocation | |
- typed for security group This is an internal API, not intended for external | |
- consumption. | |
- type: object | |
- properties: | |
- apiVersion: | |
- description: 'APIVersion defines the versioned schema of this representation | |
- of an object. Servers should convert recognized schemas to the latest | |
- internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | |
- type: string | |
- data: | |
- description: data is a byte array representing the serialized state of a | |
- range allocation. It is a bitmap with each bit set to one to represent | |
- a range is taken. | |
- type: string | |
- format: byte | |
- kind: | |
- description: 'Kind is a string value representing the REST resource this | |
- object represents. Servers may infer this from the endpoint the client | |
- submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | |
- type: string | |
- metadata: | |
- type: object | |
- range: | |
- description: range is a string representing a unique label for a range of | |
- uids, "1000000000-2000000000/10000". | |
- type: string | |
diff --git a/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml-patch b/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml-patch | |
new file mode 100644 | |
index 00000000..2e494443 | |
--- /dev/null | |
+++ b/securityinternal/v1/0000_04_securityinternal-openshift_01_rangeallocation.crd.yaml-patch | |
@@ -0,0 +1,8 @@ | |
+- op: replace | |
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/data/type | |
+ value: "array" | |
+- op: remove | |
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/data/format | |
+- op: add | |
+ path: /spec/versions/name=v1/schema/openAPIV3Schema/properties/data/items | |
+ value: {"type": "integer", "minimum": 0, "maximum": 255,"description":"A byte value, i.e. between 0 and 255"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment