From 8b4431bc10e7831d3409dcb014de549135bd7436 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 16 Apr 2020 18:50:43 +0200 Subject: [PATCH] =?UTF-8?q?[json=20schema]=20When=20we=20don=E2=80=99t=20k?= =?UTF-8?q?now=20a=20field=E2=80=99s=20type,=20let=E2=80=99s=20leave=20it?= =?UTF-8?q?=20empty?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #3932 Signed-off-by: David Gageot --- docs/content/en/schemas/v1.json | 1 - docs/content/en/schemas/v1beta10.json | 1 - docs/content/en/schemas/v1beta11.json | 1 - docs/content/en/schemas/v1beta12.json | 1 - docs/content/en/schemas/v1beta13.json | 1 - docs/content/en/schemas/v1beta14.json | 1 - docs/content/en/schemas/v1beta15.json | 1 - docs/content/en/schemas/v1beta16.json | 1 - docs/content/en/schemas/v1beta17.json | 1 - docs/content/en/schemas/v1beta5.json | 1 - docs/content/en/schemas/v1beta6.json | 1 - docs/content/en/schemas/v1beta7.json | 1 - docs/content/en/schemas/v1beta8.json | 1 - docs/content/en/schemas/v1beta9.json | 1 - docs/content/en/schemas/v2alpha1.json | 1 - docs/content/en/schemas/v2alpha2.json | 1 - docs/content/en/schemas/v2alpha3.json | 1 - docs/content/en/schemas/v2alpha4.json | 1 - docs/content/en/schemas/v2beta1.json | 1 - docs/content/en/schemas/v2beta2.json | 1 - hack/schemas/main.go | 2 -- 21 files changed, 22 deletions(-) diff --git a/docs/content/en/schemas/v1.json b/docs/content/en/schemas/v1.json index e674cf944c5..3a6ff73748f 100755 --- a/docs/content/en/schemas/v1.json +++ b/docs/content/en/schemas/v1.json @@ -1351,7 +1351,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta10.json b/docs/content/en/schemas/v1beta10.json index 1c61c79c233..5ae3b5f6c25 100755 --- a/docs/content/en/schemas/v1beta10.json +++ b/docs/content/en/schemas/v1beta10.json @@ -1153,7 +1153,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta11.json b/docs/content/en/schemas/v1beta11.json index 662f54777e2..1f55627422a 100755 --- a/docs/content/en/schemas/v1beta11.json +++ b/docs/content/en/schemas/v1beta11.json @@ -1162,7 +1162,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta12.json b/docs/content/en/schemas/v1beta12.json index c8f910eaccc..e638576de4c 100755 --- a/docs/content/en/schemas/v1beta12.json +++ b/docs/content/en/schemas/v1beta12.json @@ -1162,7 +1162,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta13.json b/docs/content/en/schemas/v1beta13.json index b714a4424bf..59030865d74 100755 --- a/docs/content/en/schemas/v1beta13.json +++ b/docs/content/en/schemas/v1beta13.json @@ -1214,7 +1214,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta14.json b/docs/content/en/schemas/v1beta14.json index 07f522e426f..2e592159d5a 100755 --- a/docs/content/en/schemas/v1beta14.json +++ b/docs/content/en/schemas/v1beta14.json @@ -1198,7 +1198,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta15.json b/docs/content/en/schemas/v1beta15.json index aea3c6e8130..da64bec3130 100755 --- a/docs/content/en/schemas/v1beta15.json +++ b/docs/content/en/schemas/v1beta15.json @@ -1208,7 +1208,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta16.json b/docs/content/en/schemas/v1beta16.json index 4ad06e93c44..86f538936e9 100755 --- a/docs/content/en/schemas/v1beta16.json +++ b/docs/content/en/schemas/v1beta16.json @@ -1250,7 +1250,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta17.json b/docs/content/en/schemas/v1beta17.json index 457ee60742b..ad66cc3ba52 100755 --- a/docs/content/en/schemas/v1beta17.json +++ b/docs/content/en/schemas/v1beta17.json @@ -1250,7 +1250,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta5.json b/docs/content/en/schemas/v1beta5.json index b210e89e2d0..9d15f1b55e4 100755 --- a/docs/content/en/schemas/v1beta5.json +++ b/docs/content/en/schemas/v1beta5.json @@ -957,7 +957,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta6.json b/docs/content/en/schemas/v1beta6.json index 76e6b6787b1..7666bfb25f7 100755 --- a/docs/content/en/schemas/v1beta6.json +++ b/docs/content/en/schemas/v1beta6.json @@ -1006,7 +1006,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta7.json b/docs/content/en/schemas/v1beta7.json index b0e9fce64b5..203f12cb45f 100755 --- a/docs/content/en/schemas/v1beta7.json +++ b/docs/content/en/schemas/v1beta7.json @@ -1101,7 +1101,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta8.json b/docs/content/en/schemas/v1beta8.json index b92c50cef09..e213aa7988a 100755 --- a/docs/content/en/schemas/v1beta8.json +++ b/docs/content/en/schemas/v1beta8.json @@ -1147,7 +1147,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v1beta9.json b/docs/content/en/schemas/v1beta9.json index b0ab08bbf2c..5c85bce73a6 100755 --- a/docs/content/en/schemas/v1beta9.json +++ b/docs/content/en/schemas/v1beta9.json @@ -1052,7 +1052,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2alpha1.json b/docs/content/en/schemas/v2alpha1.json index 803b21b0527..e3c2538c4af 100755 --- a/docs/content/en/schemas/v2alpha1.json +++ b/docs/content/en/schemas/v2alpha1.json @@ -1364,7 +1364,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2alpha2.json b/docs/content/en/schemas/v2alpha2.json index e138f3fce3e..c62068648ed 100755 --- a/docs/content/en/schemas/v2alpha2.json +++ b/docs/content/en/schemas/v2alpha2.json @@ -1303,7 +1303,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2alpha3.json b/docs/content/en/schemas/v2alpha3.json index 433ac93fa92..fd404690b45 100755 --- a/docs/content/en/schemas/v2alpha3.json +++ b/docs/content/en/schemas/v2alpha3.json @@ -1335,7 +1335,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2alpha4.json b/docs/content/en/schemas/v2alpha4.json index 433ac93fa92..fd404690b45 100755 --- a/docs/content/en/schemas/v2alpha4.json +++ b/docs/content/en/schemas/v2alpha4.json @@ -1335,7 +1335,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2beta1.json b/docs/content/en/schemas/v2beta1.json index 952567aaabc..ffdc2c96fbf 100755 --- a/docs/content/en/schemas/v2beta1.json +++ b/docs/content/en/schemas/v2beta1.json @@ -1339,7 +1339,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/docs/content/en/schemas/v2beta2.json b/docs/content/en/schemas/v2beta2.json index 952567aaabc..ffdc2c96fbf 100755 --- a/docs/content/en/schemas/v2beta2.json +++ b/docs/content/en/schemas/v2beta2.json @@ -1339,7 +1339,6 @@ ] }, "value": { - "type": "object", "description": "value to apply. Can be any portion of yaml.", "x-intellij-html-description": "value to apply. Can be any portion of yaml." } diff --git a/hack/schemas/main.go b/hack/schemas/main.go index 52e3a333bff..3a7273ed22c 100644 --- a/hack/schemas/main.go +++ b/hack/schemas/main.go @@ -214,8 +214,6 @@ func (g *schemaGenerator) newDefinition(name string, t ast.Expr, comment string, if ident, ok := tt.X.(*ast.Ident); ok { typeName := ident.Name setTypeOrRef(def, typeName) - } else if _, ok := tt.X.(*ast.SelectorExpr); ok { - def.Type = "object" } case *ast.ArrayType: