From 819b6b45af97511f5bfe115252eb89bd909deaf2 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Tue, 7 Dec 2021 16:26:05 -0500 Subject: [PATCH 1/4] update validation & schema Signed-off-by: Stephanie --- ...pace.devfile.io_devworkspaces.v1beta1.yaml | 42 +++++++---- crds/workspace.devfile.io_devworkspaces.yaml | 42 +++++++---- ...file.io_devworkspacetemplates.v1beta1.yaml | 39 ++++++---- ...pace.devfile.io_devworkspacetemplates.yaml | 39 ++++++---- pkg/apis/workspaces/v1alpha2/endpoint.go | 3 +- .../v1alpha2/zz_generated.parent_overrides.go | 6 +- .../v1alpha2/zz_generated.plugin_overrides.go | 3 +- pkg/validation/components_test.go | 10 +-- pkg/validation/endpoints.go | 14 ++-- pkg/validation/endpoints_test.go | 3 +- pkg/validation/errors.go | 2 +- pkg/validation/validation-rule.md | 3 +- .../latest/dev-workspace-template-spec.json | 36 ++++++---- schemas/latest/dev-workspace-template.json | 36 ++++++---- schemas/latest/dev-workspace.json | 36 ++++++---- schemas/latest/devfile.json | 18 +++-- .../dev-workspace-template-spec.json | 72 ++++++++++++------- .../ide-targeted/dev-workspace-template.json | 72 ++++++++++++------- .../latest/ide-targeted/dev-workspace.json | 72 ++++++++++++------- schemas/latest/ide-targeted/devfile.json | 36 ++++++---- .../latest/ide-targeted/parent-overrides.json | 36 ++++++---- .../latest/ide-targeted/plugin-overrides.json | 18 +++-- schemas/latest/parent-overrides.json | 18 +++-- schemas/latest/plugin-overrides.json | 9 ++- 24 files changed, 442 insertions(+), 223 deletions(-) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index 2c06de8db..5c6ea40f7 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -413,7 +413,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -453,6 +453,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -702,7 +703,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -742,6 +743,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -816,7 +818,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -856,6 +858,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1201,7 +1204,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1245,6 +1248,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name @@ -1481,7 +1486,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1525,6 +1530,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name @@ -1605,7 +1612,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1649,6 +1656,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name @@ -2091,7 +2100,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2132,6 +2141,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2356,7 +2366,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2397,6 +2407,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2471,7 +2482,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2512,6 +2523,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2866,7 +2878,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2914,6 +2926,8 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3164,7 +3178,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3212,6 +3226,8 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3295,7 +3311,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3343,6 +3359,8 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 9557700f3..80719b77b 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -420,7 +420,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -461,6 +461,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -714,7 +715,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -755,6 +756,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -831,7 +833,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -872,6 +874,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1221,7 +1224,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1267,6 +1270,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -1509,7 +1514,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1555,6 +1560,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -1636,7 +1643,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1682,6 +1689,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -2127,7 +2136,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2169,6 +2178,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2397,7 +2407,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2439,6 +2449,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2514,7 +2525,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2556,6 +2567,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2916,7 +2928,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2966,6 +2978,8 @@ spec: of `https` or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3218,7 +3232,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3268,6 +3282,8 @@ spec: of `https` or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3352,7 +3368,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3402,6 +3418,8 @@ spec: of `https` or `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name diff --git a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml index 5eacc6423..1504168be 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml @@ -381,7 +381,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -418,6 +418,7 @@ spec: This requires a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -664,7 +665,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -701,6 +702,7 @@ spec: This requires a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -772,7 +774,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -809,6 +811,7 @@ spec: This requires a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1146,7 +1149,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1188,6 +1191,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1416,7 +1420,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1458,6 +1462,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1533,7 +1538,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1575,6 +1580,7 @@ spec: protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2001,7 +2007,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2041,6 +2047,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2259,7 +2266,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2299,6 +2306,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2372,7 +2380,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2412,6 +2420,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2756,7 +2765,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2800,6 +2809,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name @@ -3036,7 +3047,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3080,6 +3091,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name @@ -3160,7 +3173,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3204,6 +3217,8 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be + unique. type: integer required: - name diff --git a/crds/workspace.devfile.io_devworkspacetemplates.yaml b/crds/workspace.devfile.io_devworkspacetemplates.yaml index 7c4443039..bb85f5169 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.yaml @@ -387,7 +387,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -426,6 +426,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -675,7 +676,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -714,6 +715,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -788,7 +790,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -827,6 +829,7 @@ spec: `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1166,7 +1169,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1209,6 +1212,7 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1440,7 +1444,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1483,6 +1487,7 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -1559,7 +1564,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1602,6 +1607,7 @@ spec: a protocol of `https` or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2036,7 +2042,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2076,6 +2082,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2296,7 +2303,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2336,6 +2343,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2410,7 +2418,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2450,6 +2458,7 @@ spec: or `wss`. type: boolean targetPort: + description: The port number should be unique. type: integer required: - name @@ -2798,7 +2807,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2844,6 +2853,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3086,7 +3097,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3132,6 +3143,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name @@ -3213,7 +3226,7 @@ spec: - none type: string name: - maxLength: 63 + maxLength: 15 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3259,6 +3272,8 @@ spec: `wss`. type: boolean targetPort: + description: The port number should + be unique. type: integer required: - name diff --git a/pkg/apis/workspaces/v1alpha2/endpoint.go b/pkg/apis/workspaces/v1alpha2/endpoint.go index ea4b9bec8..b825a55e2 100644 --- a/pkg/apis/workspaces/v1alpha2/endpoint.go +++ b/pkg/apis/workspaces/v1alpha2/endpoint.go @@ -47,9 +47,10 @@ const ( // +devfile:getter:generate type Endpoint struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MaxLength=15 Name string `json:"name"` + // The port number should be unique. TargetPort int `json:"targetPort"` // Describes how the endpoint should be exposed on the network. diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go index e7957cb6a..d8bc70e04 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go @@ -440,10 +440,11 @@ type ContainerParentOverride struct { type EndpointParentOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MaxLength=15 Name string `json:"name"` // +optional + // The port number should be unique. TargetPort int `json:"targetPort,omitempty"` // Describes how the endpoint should be exposed on the network. @@ -1122,10 +1123,11 @@ type ContainerPluginOverrideParentOverride struct { type EndpointPluginOverrideParentOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MaxLength=15 Name string `json:"name"` // +optional + // The port number should be unique. TargetPort int `json:"targetPort,omitempty"` // Describes how the endpoint should be exposed on the network. diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go index caa60e730..b0a815d08 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go @@ -310,10 +310,11 @@ type ContainerPluginOverride struct { type EndpointPluginOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=63 + // +kubebuilder:validation:MaxLength=15 Name string `json:"name"` // +optional + // The port number should be unique. TargetPort int `json:"targetPort,omitempty"` // Describes how the endpoint should be exposed on the network. diff --git a/pkg/validation/components_test.go b/pkg/validation/components_test.go index 0ed654a6c..ae1f899e2 100644 --- a/pkg/validation/components_test.go +++ b/pkg/validation/components_test.go @@ -237,13 +237,14 @@ func TestValidateComponents(t *testing.T) { endpointUrl18080 := generateDummyEndpoint("url1", 8080) endpointUrl18081 := generateDummyEndpoint("url1", 8081) endpointUrl28080 := generateDummyEndpoint("url2", 8080) + endpointUrl28081 := generateDummyEndpoint("url2", 8081) invalidVolMountErr := ".*\nvolume mount myinvalidvol belonging to the container component.*\nvolume mount myinvalidvol2 belonging to the container component.*" duplicateComponentErr := "duplicate key: component1" reservedEnvErr := "env variable .* is reserved and cannot be customized in component.*" invalidSizeErr := "size .* for volume component is invalid" sameEndpointNameErr := "devfile contains multiple endpoint entries with same name.*" - sameTargetPortErr := "devfile contains multiple containers with same TargetPort.*" + sameTargetPortErr := "devfile contains multiple endpoint entries with same TargetPort.*" invalidURIErr := ".*invalid URI for request" imageCompTwoRemoteErr := "component .* should have one remote only" imageCompNoRemoteErr := "component .* should have at least one remote" @@ -326,10 +327,11 @@ func TestValidateComponents(t *testing.T) { wantErr: []string{sameTargetPortErr}, }, { - name: "Valid container with same target ports but different endpoint name", + name: "Invalid container with same target ports in a single component", components: []v1alpha2.Component{ generateDummyContainerComponent("name1", nil, []v1alpha2.Endpoint{endpointUrl18080, endpointUrl28080}, nil, v1alpha2.Annotation{}, false), }, + wantErr: []string{sameTargetPortErr}, }, { name: "Valid containers with valid resource requirement", @@ -466,14 +468,14 @@ func TestValidateComponents(t *testing.T) { { name: "Invalid Openshift Component with bad URI", components: []v1alpha2.Component{ - generateDummyOpenshiftComponent("name1", []v1alpha2.Endpoint{endpointUrl18080, endpointUrl28080}, "http//wronguri"), + generateDummyOpenshiftComponent("name1", []v1alpha2.Endpoint{endpointUrl18080, endpointUrl28081}, "http//wronguri"), }, wantErr: []string{invalidURIErr}, }, { name: "Valid Kubernetes Component", components: []v1alpha2.Component{ - generateDummyKubernetesComponent("name1", []v1alpha2.Endpoint{endpointUrl18080, endpointUrl28080}, "http://uri"), + generateDummyKubernetesComponent("name1", []v1alpha2.Endpoint{endpointUrl18080, endpointUrl28081}, "http://uri"), }, }, { diff --git a/pkg/validation/endpoints.go b/pkg/validation/endpoints.go index 9970c899d..55d7a4f6c 100644 --- a/pkg/validation/endpoints.go +++ b/pkg/validation/endpoints.go @@ -5,24 +5,18 @@ import "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" // validateEndpoints checks if // 1. all the endpoint names are unique across components // 2. endpoint port are unique across component containers -// ie; two component containers cannot have the same target port but two endpoints -// in a single component container can have the same target port func validateEndpoints(endpoints []v1alpha2.Endpoint, processedEndPointPort map[int]bool, processedEndPointName map[string]bool) (errList []error) { - currentComponentEndPointPort := make(map[int]bool) for _, endPoint := range endpoints { if _, ok := processedEndPointName[endPoint.Name]; ok { errList = append(errList, &InvalidEndpointError{name: endPoint.Name}) } + if _, ok := processedEndPointPort[endPoint.TargetPort]; ok { + errList = append(errList, &InvalidEndpointError{port: endPoint.TargetPort}) + } processedEndPointName[endPoint.Name] = true - currentComponentEndPointPort[endPoint.TargetPort] = true + processedEndPointPort[endPoint.TargetPort] = true } - for targetPort := range currentComponentEndPointPort { - if _, ok := processedEndPointPort[targetPort]; ok { - errList = append(errList, &InvalidEndpointError{port: targetPort}) - } - processedEndPointPort[targetPort] = true - } return errList } diff --git a/pkg/validation/endpoints_test.go b/pkg/validation/endpoints_test.go index 597053afe..83d937ba3 100644 --- a/pkg/validation/endpoints_test.go +++ b/pkg/validation/endpoints_test.go @@ -10,7 +10,7 @@ import ( func TestValidateEndpoints(t *testing.T) { duplicateNameErr := "multiple endpoint entries with same name" - duplicatePortErr := "devfile contains multiple containers with same TargetPort" + duplicatePortErr := "devfile contains multiple endpoint entries with same TargetPort" tests := []struct { name string @@ -48,6 +48,7 @@ func TestValidateEndpoints(t *testing.T) { }, processedEndpointName: map[string]bool{}, processedEndpointPort: map[int]bool{}, + wantErr: []string{duplicatePortErr}, }, { name: "Duplicate endpoint port across components", diff --git a/pkg/validation/errors.go b/pkg/validation/errors.go index 705e1b9d2..748c51e78 100644 --- a/pkg/validation/errors.go +++ b/pkg/validation/errors.go @@ -96,7 +96,7 @@ func (e *InvalidEndpointError) Error() string { if e.name != "" { errMsg = fmt.Sprintf("devfile contains multiple endpoint entries with same name: %v", e.name) } else if fmt.Sprint(e.port) != "" { - errMsg = fmt.Sprintf("devfile contains multiple containers with same TargetPort: %v", e.port) + errMsg = fmt.Sprintf("devfile contains multiple endpoint entries with same TargetPort: %v", e.port) } return errMsg diff --git a/pkg/validation/validation-rule.md b/pkg/validation/validation-rule.md index cc5b81647..83f9c79af 100644 --- a/pkg/validation/validation-rule.md +++ b/pkg/validation/validation-rule.md @@ -14,8 +14,7 @@ The validation will be done as part of schema validation, the rule will be intro ### Endpoints: - all the endpoint names are unique across components - -Since network is shared in the same pod, endpoint ports should be unique across components, two components cannot have the same target port but two endpoints in a single component can have the same target port. Only exception: container component with `dedicatedpod=true` +- all the endpoint ports are unique across components. Only exception: container component with `dedicatedpod=true` ### Commands: 1. id must be unique diff --git a/schemas/latest/dev-workspace-template-spec.json b/schemas/latest/dev-workspace-template-spec.json index 9d26a2d10..324e0ffba 100644 --- a/schemas/latest/dev-workspace-template-spec.json +++ b/schemas/latest/dev-workspace-template-spec.json @@ -405,7 +405,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -430,6 +430,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -688,7 +689,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -713,6 +714,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -785,7 +787,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -810,6 +812,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1159,7 +1162,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1183,6 +1186,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1408,7 +1412,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1432,6 +1436,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1502,7 +1507,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1526,6 +1531,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1989,7 +1995,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2013,6 +2019,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2238,7 +2245,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2262,6 +2269,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2332,7 +2340,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2356,6 +2364,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2705,7 +2714,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2729,6 +2738,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2954,7 +2964,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2978,6 +2988,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -3048,7 +3059,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3072,6 +3083,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, diff --git a/schemas/latest/dev-workspace-template.json b/schemas/latest/dev-workspace-template.json index cc4c04d12..aee0eb14c 100644 --- a/schemas/latest/dev-workspace-template.json +++ b/schemas/latest/dev-workspace-template.json @@ -571,7 +571,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -596,6 +596,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -854,7 +855,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -879,6 +880,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -951,7 +953,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -976,6 +978,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1325,7 +1328,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1349,6 +1352,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1574,7 +1578,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1598,6 +1602,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1668,7 +1673,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1692,6 +1697,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2155,7 +2161,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2179,6 +2185,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2404,7 +2411,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2428,6 +2435,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2498,7 +2506,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2522,6 +2530,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2871,7 +2880,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2895,6 +2904,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -3120,7 +3130,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3144,6 +3154,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -3214,7 +3225,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3238,6 +3249,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, diff --git a/schemas/latest/dev-workspace.json b/schemas/latest/dev-workspace.json index 7fb25123c..c7677c079 100644 --- a/schemas/latest/dev-workspace.json +++ b/schemas/latest/dev-workspace.json @@ -584,7 +584,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -609,6 +609,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -867,7 +868,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -892,6 +893,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -964,7 +966,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -989,6 +991,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1338,7 +1341,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1362,6 +1365,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1587,7 +1591,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1611,6 +1615,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1681,7 +1686,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1705,6 +1710,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2168,7 +2174,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2192,6 +2198,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2417,7 +2424,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2441,6 +2448,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2511,7 +2519,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2535,6 +2543,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -2884,7 +2893,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2908,6 +2917,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -3133,7 +3143,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3157,6 +3167,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -3227,7 +3238,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3251,6 +3262,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, diff --git a/schemas/latest/devfile.json b/schemas/latest/devfile.json index c3acf1604..4bb06af13 100644 --- a/schemas/latest/devfile.json +++ b/schemas/latest/devfile.json @@ -344,7 +344,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -369,6 +369,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -607,7 +608,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -632,6 +633,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -704,7 +706,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -729,6 +731,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1216,7 +1219,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1240,6 +1243,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1465,7 +1469,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1489,6 +1493,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1559,7 +1564,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1583,6 +1588,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, diff --git a/schemas/latest/ide-targeted/dev-workspace-template-spec.json b/schemas/latest/ide-targeted/dev-workspace-template-spec.json index 8b5d8e64f..739f329b5 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template-spec.json +++ b/schemas/latest/ide-targeted/dev-workspace-template-spec.json @@ -448,7 +448,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -475,7 +475,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -761,7 +763,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -788,7 +790,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -866,7 +870,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -893,7 +897,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1281,7 +1287,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1308,7 +1314,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1560,7 +1568,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1587,7 +1595,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1664,7 +1674,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1691,7 +1701,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2212,7 +2224,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2239,7 +2251,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2491,7 +2505,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2518,7 +2532,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2595,7 +2611,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2622,7 +2638,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3010,7 +3028,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3037,7 +3055,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3289,7 +3309,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3316,7 +3336,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3393,7 +3415,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3420,7 +3442,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/ide-targeted/dev-workspace-template.json b/schemas/latest/ide-targeted/dev-workspace-template.json index d3cbc5983..86ec7ac29 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template.json +++ b/schemas/latest/ide-targeted/dev-workspace-template.json @@ -647,7 +647,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -674,7 +674,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -960,7 +962,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -987,7 +989,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1065,7 +1069,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1092,7 +1096,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1480,7 +1486,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1507,7 +1513,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1759,7 +1767,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1786,7 +1794,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1863,7 +1873,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1890,7 +1900,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2411,7 +2423,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2438,7 +2450,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2690,7 +2704,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2717,7 +2731,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2794,7 +2810,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2821,7 +2837,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3209,7 +3227,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3236,7 +3254,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3488,7 +3508,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3515,7 +3535,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3592,7 +3614,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3619,7 +3641,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/ide-targeted/dev-workspace.json b/schemas/latest/ide-targeted/dev-workspace.json index 9ad876bd7..efff414da 100644 --- a/schemas/latest/ide-targeted/dev-workspace.json +++ b/schemas/latest/ide-targeted/dev-workspace.json @@ -660,7 +660,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -687,7 +687,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -973,7 +975,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1000,7 +1002,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1078,7 +1082,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1105,7 +1109,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1493,7 +1499,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1520,7 +1526,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1772,7 +1780,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1799,7 +1807,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1876,7 +1886,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1903,7 +1913,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2424,7 +2436,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2451,7 +2463,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2703,7 +2717,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2730,7 +2744,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -2807,7 +2823,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2834,7 +2850,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3222,7 +3240,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3249,7 +3267,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3501,7 +3521,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3528,7 +3548,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -3605,7 +3627,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3632,7 +3654,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/ide-targeted/devfile.json b/schemas/latest/ide-targeted/devfile.json index 135df2566..be15b62df 100644 --- a/schemas/latest/ide-targeted/devfile.json +++ b/schemas/latest/ide-targeted/devfile.json @@ -380,7 +380,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -407,7 +407,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -670,7 +672,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -697,7 +699,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -775,7 +779,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -802,7 +806,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1354,7 +1360,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1381,7 +1387,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1633,7 +1641,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1660,7 +1668,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1737,7 +1747,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1764,7 +1774,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/ide-targeted/parent-overrides.json b/schemas/latest/ide-targeted/parent-overrides.json index 00b9d73b4..2eac3f939 100644 --- a/schemas/latest/ide-targeted/parent-overrides.json +++ b/schemas/latest/ide-targeted/parent-overrides.json @@ -361,7 +361,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -388,7 +388,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -640,7 +642,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -667,7 +669,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -744,7 +748,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -771,7 +775,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1159,7 +1165,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1186,7 +1192,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1438,7 +1446,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1465,7 +1473,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -1542,7 +1552,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1569,7 +1579,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/ide-targeted/plugin-overrides.json b/schemas/latest/ide-targeted/plugin-overrides.json index ff3b8337f..5ec69c61e 100644 --- a/schemas/latest/ide-targeted/plugin-overrides.json +++ b/schemas/latest/ide-targeted/plugin-overrides.json @@ -350,7 +350,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -377,7 +377,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -629,7 +631,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -656,7 +658,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false @@ -733,7 +737,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -760,7 +764,9 @@ "markdownDescription": "Describes whether the endpoint should be secured and protected by some authentication process. This requires a protocol of `https` or `wss`." }, "targetPort": { - "type": "integer" + "description": "The port number should be unique.", + "type": "integer", + "markdownDescription": "The port number should be unique." } }, "additionalProperties": false diff --git a/schemas/latest/parent-overrides.json b/schemas/latest/parent-overrides.json index a55ebff94..c31c1d798 100644 --- a/schemas/latest/parent-overrides.json +++ b/schemas/latest/parent-overrides.json @@ -323,7 +323,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -347,6 +347,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -572,7 +573,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -596,6 +597,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -666,7 +668,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -690,6 +692,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1039,7 +1042,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1063,6 +1066,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1288,7 +1292,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1312,6 +1316,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -1382,7 +1387,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1406,6 +1411,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, diff --git a/schemas/latest/plugin-overrides.json b/schemas/latest/plugin-overrides.json index b82952580..e680b2eae 100644 --- a/schemas/latest/plugin-overrides.json +++ b/schemas/latest/plugin-overrides.json @@ -313,7 +313,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -337,6 +337,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -562,7 +563,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -586,6 +587,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, @@ -656,7 +658,7 @@ }, "name": { "type": "string", - "maxLength": 63, + "maxLength": 15, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -680,6 +682,7 @@ "type": "boolean" }, "targetPort": { + "description": "The port number should be unique.", "type": "integer" } }, From b80510570688633b67c32ea8c10ba0c8a9c8b939 Mon Sep 17 00:00:00 2001 From: Stephanie Date: Wed, 8 Dec 2021 12:51:36 -0500 Subject: [PATCH 2/4] fix build error Signed-off-by: Stephanie --- generator/crds/zz_generated.markerhelp.go | 1 + generator/getters/zz_generated.markerhelp.go | 1 + generator/interfaces/zz_generated.markerhelp.go | 1 + generator/overrides/zz_generated.markerhelp.go | 1 + generator/schemas/zz_generated.markerhelp.go | 1 + generator/validate/zz_generated.markerhelp.go | 1 + pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go | 1 + test/v200/json/component-parent-tests.json | 6 +++--- test/v200/json/component-tests.json | 6 +++--- test/v200/utils/common/endpoint_test_utils.go | 2 +- test/v200/utils/common/parent_endpoint-test-utils.go | 2 +- 11 files changed, 15 insertions(+), 8 deletions(-) diff --git a/generator/crds/zz_generated.markerhelp.go b/generator/crds/zz_generated.markerhelp.go index 6be3f97a0..615653311 100644 --- a/generator/crds/zz_generated.markerhelp.go +++ b/generator/crds/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/getters/zz_generated.markerhelp.go b/generator/getters/zz_generated.markerhelp.go index 98f022020..9627a57e7 100644 --- a/generator/getters/zz_generated.markerhelp.go +++ b/generator/getters/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/interfaces/zz_generated.markerhelp.go b/generator/interfaces/zz_generated.markerhelp.go index f62612939..1e07f3656 100644 --- a/generator/interfaces/zz_generated.markerhelp.go +++ b/generator/interfaces/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/overrides/zz_generated.markerhelp.go b/generator/overrides/zz_generated.markerhelp.go index ca6d7a98f..0da6281de 100644 --- a/generator/overrides/zz_generated.markerhelp.go +++ b/generator/overrides/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/schemas/zz_generated.markerhelp.go b/generator/schemas/zz_generated.markerhelp.go index e1b1be4a6..d6e21d9bc 100644 --- a/generator/schemas/zz_generated.markerhelp.go +++ b/generator/schemas/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/generator/validate/zz_generated.markerhelp.go b/generator/validate/zz_generated.markerhelp.go index 9741b37ca..150e7a595 100644 --- a/generator/validate/zz_generated.markerhelp.go +++ b/generator/validate/zz_generated.markerhelp.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Generated for the devfile generator diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go index b2bf342b3..e4881d640 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated // Code generated by controller-gen. DO NOT EDIT. diff --git a/test/v200/json/component-parent-tests.json b/test/v200/json/component-parent-tests.json index bf85813a9..d2ebd6c2f 100644 --- a/test/v200/json/component-parent-tests.json +++ b/test/v200/json/component-parent-tests.json @@ -69,7 +69,7 @@ }, { "FileName" : "componentContainerEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/containerEndpointLongName.yaml"] }, @@ -142,7 +142,7 @@ }, { "FileName" : "componentKubernetesEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/kubernetesEndpointLongName.yaml"] }, @@ -215,7 +215,7 @@ }, { "FileName" : "componentOpenshiftEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/openshiftEndpointLongName.yaml"] }, diff --git a/test/v200/json/component-tests.json b/test/v200/json/component-tests.json index 4fa8349f4..77ca8930c 100644 --- a/test/v200/json/component-tests.json +++ b/test/v200/json/component-tests.json @@ -75,7 +75,7 @@ }, { "FileName" : "componentContainerEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/containerEndpointLongName.yaml"] }, @@ -166,7 +166,7 @@ }, { "FileName" : "componentKubernetesEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/kubernetesEndpointLongName.yaml"] }, @@ -245,7 +245,7 @@ }, { "FileName" : "componentOpenshiftEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 63", + "ExpectOutcome" : "length must be <= 15", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/openshiftEndpointLongName.yaml"] }, diff --git a/test/v200/utils/common/endpoint_test_utils.go b/test/v200/utils/common/endpoint_test_utils.go index 4442501c7..3bbff4f95 100644 --- a/test/v200/utils/common/endpoint_test_utils.go +++ b/test/v200/utils/common/endpoint_test_utils.go @@ -48,7 +48,7 @@ func (devfile *TestDevfile) CreateEndpoints() []schema.Endpoint { endpoint := schema.Endpoint{} - endpoint.Name = GetRandomUniqueString(GetRandomNumber(5, 24), true) + endpoint.Name = GetRandomUniqueString(GetRandomNumber(5, 10), true) LogInfoMessage(fmt.Sprintf(" ....... add endpoint %d name : %s", i, endpoint.Name)) if GetBinaryDecision() { diff --git a/test/v200/utils/common/parent_endpoint-test-utils.go b/test/v200/utils/common/parent_endpoint-test-utils.go index 716458c0b..4508b05a9 100644 --- a/test/v200/utils/common/parent_endpoint-test-utils.go +++ b/test/v200/utils/common/parent_endpoint-test-utils.go @@ -18,7 +18,7 @@ func (devfile *TestDevfile) CreateParentEndpoints() []schema.EndpointParentOverr endpoint := schema.EndpointParentOverride{} - endpoint.Name = GetRandomUniqueString(GetRandomNumber(5, 24), true) + endpoint.Name = GetRandomUniqueString(GetRandomNumber(5, 10), true) LogInfoMessage(fmt.Sprintf(" ....... add endpoint %d name : %s", i, endpoint.Name)) if GetBinaryDecision() { From 1c45bd13b2b0c3a7b03c6f64a8ee5f04db23ec0a Mon Sep 17 00:00:00 2001 From: Stephanie Date: Fri, 14 Jan 2022 16:56:38 -0500 Subject: [PATCH 3/4] update generater to only shorten endpoint name length limit in devfile spec Signed-off-by: Stephanie --- ...pace.devfile.io_devworkspaces.v1beta1.yaml | 24 +++++++-------- crds/workspace.devfile.io_devworkspaces.yaml | 24 +++++++-------- ...file.io_devworkspacetemplates.v1beta1.yaml | 24 +++++++-------- ...pace.devfile.io_devworkspacetemplates.yaml | 24 +++++++-------- generator/schemas/gen.go | 29 +++++++++++++++++++ generator/schemas/zz_generated.markerhelp.go | 4 +++ pkg/apis/workspaces/v1alpha2/devfile.go | 2 +- pkg/apis/workspaces/v1alpha2/endpoint.go | 2 +- .../v1alpha2/zz_generated.parent_overrides.go | 4 +-- .../v1alpha2/zz_generated.plugin_overrides.go | 2 +- .../latest/dev-workspace-template-spec.json | 24 +++++++-------- schemas/latest/dev-workspace-template.json | 24 +++++++-------- schemas/latest/dev-workspace.json | 24 +++++++-------- .../dev-workspace-template-spec.json | 24 +++++++-------- .../ide-targeted/dev-workspace-template.json | 24 +++++++-------- .../latest/ide-targeted/dev-workspace.json | 24 +++++++-------- .../latest/ide-targeted/parent-overrides.json | 12 ++++---- .../latest/ide-targeted/plugin-overrides.json | 6 ++-- schemas/latest/parent-overrides.json | 12 ++++---- schemas/latest/plugin-overrides.json | 6 ++-- 20 files changed, 176 insertions(+), 143 deletions(-) diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index c0d5188e0..71f03f330 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -414,7 +414,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -712,7 +712,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -831,7 +831,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1218,7 +1218,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1513,7 +1513,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1644,7 +1644,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2134,7 +2134,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2411,7 +2411,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2531,7 +2531,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2929,7 +2929,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3242,7 +3242,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3380,7 +3380,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 396281dbd..8e3c0603b 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -421,7 +421,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -724,7 +724,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -846,7 +846,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1239,7 +1239,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1542,7 +1542,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1676,7 +1676,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2170,7 +2170,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2452,7 +2452,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2574,7 +2574,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2979,7 +2979,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3296,7 +3296,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3437,7 +3437,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: diff --git a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml index b34c09a0c..d3b017f0d 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml @@ -382,7 +382,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -674,7 +674,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -787,7 +787,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1163,7 +1163,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1445,7 +1445,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1567,7 +1567,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2037,7 +2037,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2307,7 +2307,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2425,7 +2425,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2811,7 +2811,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3106,7 +3106,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3237,7 +3237,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: diff --git a/crds/workspace.devfile.io_devworkspacetemplates.yaml b/crds/workspace.devfile.io_devworkspacetemplates.yaml index dfe3c21a7..f39e5cb1f 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.yaml @@ -388,7 +388,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -685,7 +685,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -803,7 +803,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1184,7 +1184,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1471,7 +1471,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -1596,7 +1596,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2075,7 +2075,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2347,7 +2347,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2466,7 +2466,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -2857,7 +2857,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3160,7 +3160,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: @@ -3294,7 +3294,7 @@ spec: - none type: string name: - maxLength: 15 + maxLength: 63 pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ type: string path: diff --git a/generator/schemas/gen.go b/generator/schemas/gen.go index 367d0d2d5..f1032d639 100644 --- a/generator/schemas/gen.go +++ b/generator/schemas/gen.go @@ -40,6 +40,8 @@ type GenerateJSONSchema struct { // OmitPluginUnionMembers indicates that the Json schema generated from this type should omit Plugin component union members. OmitPluginUnionMembers bool `marker:",optional"` + ShortenEndpointNameLength bool `marker:",optional"` + // Title indicates the content ot the Json Schema `title` attribute Title string `marker:",optional"` } @@ -273,6 +275,33 @@ This is not the case in the "%s' API group: (¤tJSONSchema).Title = schemaGenerateMarker.Title + // Update endpoint name length limit to 15 chars in devfile spec, if ShortenEndpointNameLength is specified + // To fix issue: https://github.com/devfile/api/issues/700, but also to hold backward compatibility for devworkspace + genutils.EditJSONSchema(¤tJSONSchema, func(schema *apiext.JSONSchemaProps) (newVisitor genutils.Visitor, stop bool) { + if schema == nil { + return + } + if schema.Type != "object" { + return + } + if len(schema.Properties) == 0 { + return + } + for propName, prop := range schema.Properties { + if propName == "endpoints" { + for endpointPropName, endpointProp := range prop.Items.Schema.Properties { + if endpointPropName == "name" { + if schemaGenerateMarker.ShortenEndpointNameLength { + *endpointProp.MaxLength = int64(15) + break + } + } + } + } + } + return + }) + jsonSchema, err := json.MarshalIndent(¤tJSONSchema, "", " ") if err != nil { return err diff --git a/generator/schemas/zz_generated.markerhelp.go b/generator/schemas/zz_generated.markerhelp.go index d6e21d9bc..0e59bc17b 100644 --- a/generator/schemas/zz_generated.markerhelp.go +++ b/generator/schemas/zz_generated.markerhelp.go @@ -27,6 +27,10 @@ func (GenerateJSONSchema) Help() *markers.DefinitionHelp { Summary: "indicates that the Json schema generated from this type should omit Plugin component union members.", Details: "", }, + "ShortenEndpointNameLength": { + Summary: "", + Details: "", + }, "Title": { Summary: "indicates the content ot the Json Schema `title` attribute", Details: "", diff --git a/pkg/apis/workspaces/v1alpha2/devfile.go b/pkg/apis/workspaces/v1alpha2/devfile.go index 050399a40..4785ce11b 100644 --- a/pkg/apis/workspaces/v1alpha2/devfile.go +++ b/pkg/apis/workspaces/v1alpha2/devfile.go @@ -6,7 +6,7 @@ import ( // Devfile describes the structure of a cloud-native devworkspace and development environment. // +k8s:deepcopy-gen=false -// +devfile:jsonschema:generate:omitCustomUnionMembers=true,omitPluginUnionMembers=true +// +devfile:jsonschema:generate:omitCustomUnionMembers=true,omitPluginUnionMembers=true,shortenEndpointNameLength=true type Devfile struct { devfile.DevfileHeader `json:",inline"` diff --git a/pkg/apis/workspaces/v1alpha2/endpoint.go b/pkg/apis/workspaces/v1alpha2/endpoint.go index b825a55e2..6079476ed 100644 --- a/pkg/apis/workspaces/v1alpha2/endpoint.go +++ b/pkg/apis/workspaces/v1alpha2/endpoint.go @@ -47,7 +47,7 @@ const ( // +devfile:getter:generate type Endpoint struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=15 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // The port number should be unique. diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go index 6c62957e9..754777f1f 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go @@ -440,7 +440,7 @@ type ContainerParentOverride struct { type EndpointParentOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=15 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // +optional @@ -1136,7 +1136,7 @@ type ContainerPluginOverrideParentOverride struct { type EndpointPluginOverrideParentOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=15 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // +optional diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go index 030060742..c3ce13cd7 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go @@ -310,7 +310,7 @@ type ContainerPluginOverride struct { type EndpointPluginOverride struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - // +kubebuilder:validation:MaxLength=15 + // +kubebuilder:validation:MaxLength=63 Name string `json:"name"` // +optional diff --git a/schemas/latest/dev-workspace-template-spec.json b/schemas/latest/dev-workspace-template-spec.json index 5413ad393..7c5333421 100644 --- a/schemas/latest/dev-workspace-template-spec.json +++ b/schemas/latest/dev-workspace-template-spec.json @@ -405,7 +405,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -697,7 +697,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -799,7 +799,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1174,7 +1174,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1437,7 +1437,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1536,7 +1536,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2024,7 +2024,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2287,7 +2287,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2386,7 +2386,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2760,7 +2760,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3023,7 +3023,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3122,7 +3122,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/dev-workspace-template.json b/schemas/latest/dev-workspace-template.json index 42267566e..4726f0f7c 100644 --- a/schemas/latest/dev-workspace-template.json +++ b/schemas/latest/dev-workspace-template.json @@ -571,7 +571,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -863,7 +863,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -965,7 +965,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1340,7 +1340,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1603,7 +1603,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1702,7 +1702,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2190,7 +2190,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2453,7 +2453,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2552,7 +2552,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2926,7 +2926,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3189,7 +3189,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3288,7 +3288,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/dev-workspace.json b/schemas/latest/dev-workspace.json index 0aec8e86e..4db941c33 100644 --- a/schemas/latest/dev-workspace.json +++ b/schemas/latest/dev-workspace.json @@ -584,7 +584,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -876,7 +876,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -978,7 +978,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1353,7 +1353,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1616,7 +1616,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1715,7 +1715,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2203,7 +2203,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2466,7 +2466,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2565,7 +2565,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2939,7 +2939,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3202,7 +3202,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3301,7 +3301,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/ide-targeted/dev-workspace-template-spec.json b/schemas/latest/ide-targeted/dev-workspace-template-spec.json index a898d24f2..0ff0d91f3 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template-spec.json +++ b/schemas/latest/ide-targeted/dev-workspace-template-spec.json @@ -448,7 +448,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -773,7 +773,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -885,7 +885,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1302,7 +1302,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1598,7 +1598,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1709,7 +1709,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2259,7 +2259,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2555,7 +2555,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2666,7 +2666,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3083,7 +3083,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3379,7 +3379,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3490,7 +3490,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/ide-targeted/dev-workspace-template.json b/schemas/latest/ide-targeted/dev-workspace-template.json index 079befbe2..a77627df2 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template.json +++ b/schemas/latest/ide-targeted/dev-workspace-template.json @@ -647,7 +647,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -972,7 +972,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1084,7 +1084,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1501,7 +1501,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1797,7 +1797,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1908,7 +1908,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2458,7 +2458,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2754,7 +2754,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2865,7 +2865,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3282,7 +3282,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3578,7 +3578,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3689,7 +3689,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/ide-targeted/dev-workspace.json b/schemas/latest/ide-targeted/dev-workspace.json index 873ac49b7..fe162d4ba 100644 --- a/schemas/latest/ide-targeted/dev-workspace.json +++ b/schemas/latest/ide-targeted/dev-workspace.json @@ -660,7 +660,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -985,7 +985,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1097,7 +1097,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1514,7 +1514,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1810,7 +1810,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1921,7 +1921,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2471,7 +2471,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2767,7 +2767,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -2878,7 +2878,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3295,7 +3295,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3591,7 +3591,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -3702,7 +3702,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/ide-targeted/parent-overrides.json b/schemas/latest/ide-targeted/parent-overrides.json index 1d15b5c8b..5fdd7eaab 100644 --- a/schemas/latest/ide-targeted/parent-overrides.json +++ b/schemas/latest/ide-targeted/parent-overrides.json @@ -361,7 +361,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -657,7 +657,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -768,7 +768,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1185,7 +1185,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1481,7 +1481,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1592,7 +1592,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/ide-targeted/plugin-overrides.json b/schemas/latest/ide-targeted/plugin-overrides.json index 90d700c5b..938d0993b 100644 --- a/schemas/latest/ide-targeted/plugin-overrides.json +++ b/schemas/latest/ide-targeted/plugin-overrides.json @@ -350,7 +350,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -646,7 +646,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -757,7 +757,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/parent-overrides.json b/schemas/latest/parent-overrides.json index 55a82d06a..65d149e87 100644 --- a/schemas/latest/parent-overrides.json +++ b/schemas/latest/parent-overrides.json @@ -323,7 +323,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -586,7 +586,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -685,7 +685,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1059,7 +1059,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1322,7 +1322,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -1421,7 +1421,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { diff --git a/schemas/latest/plugin-overrides.json b/schemas/latest/plugin-overrides.json index e705fea30..f364f7331 100644 --- a/schemas/latest/plugin-overrides.json +++ b/schemas/latest/plugin-overrides.json @@ -313,7 +313,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -576,7 +576,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { @@ -675,7 +675,7 @@ }, "name": { "type": "string", - "maxLength": 15, + "maxLength": 63, "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, "path": { From 436f865e3328c5a8ec319484c617d22ddce32c0d Mon Sep 17 00:00:00 2001 From: Stephanie Date: Fri, 14 Jan 2022 17:19:04 -0500 Subject: [PATCH 4/4] fix api test Signed-off-by: Stephanie --- test/v200/json/component-parent-tests.json | 6 +++--- test/v200/json/component-tests.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/v200/json/component-parent-tests.json b/test/v200/json/component-parent-tests.json index d2ebd6c2f..05888a0d0 100644 --- a/test/v200/json/component-parent-tests.json +++ b/test/v200/json/component-parent-tests.json @@ -69,7 +69,7 @@ }, { "FileName" : "componentContainerEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/containerEndpointLongName.yaml"] }, @@ -142,7 +142,7 @@ }, { "FileName" : "componentKubernetesEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/kubernetesEndpointLongName.yaml"] }, @@ -215,7 +215,7 @@ }, { "FileName" : "componentOpenshiftEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/openshiftEndpointLongName.yaml"] }, diff --git a/test/v200/json/component-tests.json b/test/v200/json/component-tests.json index 77ca8930c..78629fb43 100644 --- a/test/v200/json/component-tests.json +++ b/test/v200/json/component-tests.json @@ -75,7 +75,7 @@ }, { "FileName" : "componentContainerEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/containerEndpointLongName.yaml"] }, @@ -166,7 +166,7 @@ }, { "FileName" : "componentKubernetesEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/kubernetesEndpointLongName.yaml"] }, @@ -245,7 +245,7 @@ }, { "FileName" : "componentOpenshiftEndpointLongName.yaml", - "ExpectOutcome" : "length must be <= 15", + "ExpectOutcome" : "length must be <= ", "Files": ["devfiles/components/componentStart.yaml", "devfiles/components/openshiftEndpointLongName.yaml"] },