From f4d8ccda10ca0e3ce6c9d08149ad6a538d2c2936 Mon Sep 17 00:00:00 2001 From: Jimmyscene <6708446+Jimmyscene@users.noreply.github.com> Date: Tue, 16 Nov 2021 19:28:25 -0500 Subject: [PATCH] fix: prevent read file from throwing away OpenAPI config --- kustomize/commands/internal/kustfile/kustomizationfile.go | 1 + kustomize/commands/internal/kustfile/kustomizationfile_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/kustomize/commands/internal/kustfile/kustomizationfile.go b/kustomize/commands/internal/kustfile/kustomizationfile.go index 0d313d14c..a0c544537 100644 --- a/kustomize/commands/internal/kustfile/kustomizationfile.go +++ b/kustomize/commands/internal/kustfile/kustomizationfile.go @@ -65,6 +65,7 @@ func determineFieldOrder() []string { "Transformers", "Inventory", "Components", + "OpenAPI", } // Add deprecated fields here. diff --git a/kustomize/commands/internal/kustfile/kustomizationfile_test.go b/kustomize/commands/internal/kustfile/kustomizationfile_test.go index 032605730..8e6475d36 100644 --- a/kustomize/commands/internal/kustfile/kustomizationfile_test.go +++ b/kustomize/commands/internal/kustfile/kustomizationfile_test.go @@ -47,6 +47,7 @@ func TestFieldOrder(t *testing.T) { "Transformers", "Inventory", "Components", + "OpenAPI", } actual := determineFieldOrder() if len(expected) != len(actual) {