From fa2e0f8db836e116da71954c50d12ecd81e4e081 Mon Sep 17 00:00:00 2001 From: Jakob Jensen Date: Fri, 30 Jan 2026 21:53:01 +0100 Subject: [PATCH] fix: avoid apply additional properties too much --- .cspell.json | 9 ++++++++- internal/command/updater_test.go | 2 +- internal/crd/crd.go | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.cspell.json b/.cspell.json index 5d82a5669..7422e5a31 100644 --- a/.cspell.json +++ b/.cspell.json @@ -1,8 +1,15 @@ { - "ignorePaths": ["go.mod", "go.sum"], + "ignorePaths": [ + "go.mod", + "go.sum" + ], "language": "en", "version": "0.2", "words": [ + "apiextensions", + "apimachinery", + "apiserver", + "APIV", "buildvcs", "chartutil", "checkmake", diff --git a/internal/command/updater_test.go b/internal/command/updater_test.go index b482f2835..235128912 100644 --- a/internal/command/updater_test.go +++ b/internal/command/updater_test.go @@ -184,7 +184,7 @@ func assertDirectories(t *testing.T, a, b string) { // Test is skipped during unit testing and meant for step-debugging a local check func TestCheckLocal(t *testing.T) { output := "../../build/ephemeral/schema" - config := "../../test/configuration.yaml" + config := "../../build/configuration.yaml" updater := NewUpdater(config, output, output, nil, nil) err := updater.Run() diff --git a/internal/crd/crd.go b/internal/crd/crd.go index 99aa07403..4bdd91915 100644 --- a/internal/crd/crd.go +++ b/internal/crd/crd.go @@ -196,7 +196,7 @@ func (s *CrdMetaSchema) Filepath() string { } func applyDefaults(schema *v1.JSONSchemaProps, skip bool) { - if !skip && len(schema.Properties) > 0 && schema.AdditionalProperties == nil { + if !skip && schema.Type == "object" && len(schema.Properties) > 0 && schema.AdditionalProperties == nil { schema.AdditionalProperties = &v1.JSONSchemaPropsOrBool{Allows: false} }