From ef83547c361627bd3272f1e7eec5129b3a3e677f Mon Sep 17 00:00:00 2001 From: Tom Kennedy Date: Thu, 26 Oct 2023 10:44:15 -0400 Subject: [PATCH] Update openapi codegen Signed-off-by: Tom Kennedy --- api/openapi-spec/swagger.json | 38 +++++++++++++++--- pkg/openapi/openapi_generated.go | 68 +++++++++++++++++++++++++++----- 2 files changed, 91 insertions(+), 15 deletions(-) diff --git a/api/openapi-spec/swagger.json b/api/openapi-spec/swagger.json index 3c9f697be..9334b6529 100644 --- a/api/openapi-spec/swagger.json +++ b/api/openapi-spec/swagger.json @@ -5946,6 +5946,13 @@ "os": { "type": "string" }, + "signaturePaths": { + "type": "array", + "items": { + "default": {}, + "$ref": "#/definitions/kpack.build.v1alpha2.CosignSignature" + } + }, "stack": { "default": {}, "$ref": "#/definitions/kpack.core.v1alpha1.BuildStack" @@ -6193,13 +6200,11 @@ "kpack.build.v1alpha2.ClusterBuildpackSpec": { "type": "object", "properties": { + "image": { + "type": "string" + }, "serviceAccountRef": { "$ref": "#/definitions/io.k8s.api.core.v1.ObjectReference" - }, - "source": { - "default": {}, - "x-kubernetes-list-type": "", - "$ref": "#/definitions/kpack.core.v1alpha1.ImageSource" } } }, @@ -6498,6 +6503,23 @@ } } }, + "kpack.build.v1alpha2.CosignSignature": { + "type": "object", + "required": [ + "signingSecret", + "targetDigest" + ], + "properties": { + "signingSecret": { + "type": "string", + "default": "" + }, + "targetDigest": { + "type": "string", + "default": "" + } + } + }, "kpack.build.v1alpha2.Image": { "type": "object", "required": [ @@ -7193,6 +7215,9 @@ "revision" ], "properties": { + "initializeSubmodules": { + "type": "boolean" + }, "revision": { "type": "string", "default": "" @@ -7310,6 +7335,9 @@ "type" ], "properties": { + "initializeSubmodules": { + "type": "boolean" + }, "revision": { "type": "string", "default": "" diff --git a/pkg/openapi/openapi_generated.go b/pkg/openapi/openapi_generated.go index 341644396..c585658c9 100644 --- a/pkg/openapi/openapi_generated.go +++ b/pkg/openapi/openapi_generated.go @@ -101,6 +101,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.ClusterStoreStatus": schema_pkg_apis_build_v1alpha2_ClusterStoreStatus(ref), "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.CosignAnnotation": schema_pkg_apis_build_v1alpha2_CosignAnnotation(ref), "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.CosignConfig": schema_pkg_apis_build_v1alpha2_CosignConfig(ref), + "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.CosignSignature": schema_pkg_apis_build_v1alpha2_CosignSignature(ref), "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.Image": schema_pkg_apis_build_v1alpha2_Image(ref), "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.ImageBuild": schema_pkg_apis_build_v1alpha2_ImageBuild(ref), "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.ImageBuilder": schema_pkg_apis_build_v1alpha2_ImageBuilder(ref), @@ -2799,11 +2800,24 @@ func schema_pkg_apis_build_v1alpha2_BuilderStatus(ref common.ReferenceCallback) Format: "", }, }, + "signaturePaths": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("github.com/pivotal/kpack/pkg/apis/build/v1alpha2.CosignSignature"), + }, + }, + }, + }, + }, }, }, }, Dependencies: []string{ - "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.BuildStack", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.BuildpackMetadata", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.Condition", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.OrderEntry"}, + "github.com/pivotal/kpack/pkg/apis/build/v1alpha2.CosignSignature", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.BuildStack", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.BuildpackMetadata", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.Condition", "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.OrderEntry"}, } } @@ -3237,15 +3251,10 @@ func schema_pkg_apis_build_v1alpha2_ClusterBuildpackSpec(ref common.ReferenceCal SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "source": { - VendorExtensible: spec.VendorExtensible{ - Extensions: spec.Extensions{ - "x-kubernetes-list-type": "", - }, - }, + "image": { SchemaProps: spec.SchemaProps{ - Default: map[string]interface{}{}, - Ref: ref("github.com/pivotal/kpack/pkg/apis/core/v1alpha1.ImageSource"), + Type: []string{"string"}, + Format: "", }, }, "serviceAccountRef": { @@ -3257,7 +3266,7 @@ func schema_pkg_apis_build_v1alpha2_ClusterBuildpackSpec(ref common.ReferenceCal }, }, Dependencies: []string{ - "github.com/pivotal/kpack/pkg/apis/core/v1alpha1.ImageSource", "k8s.io/api/core/v1.ObjectReference"}, + "k8s.io/api/core/v1.ObjectReference"}, } } @@ -3831,6 +3840,33 @@ func schema_pkg_apis_build_v1alpha2_CosignConfig(ref common.ReferenceCallback) c } } +func schema_pkg_apis_build_v1alpha2_CosignSignature(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "signingSecret": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "targetDigest": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"signingSecret", "targetDigest"}, + }, + }, + } +} + func schema_pkg_apis_build_v1alpha2_Image(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -5149,6 +5185,12 @@ func schema_pkg_apis_core_v1alpha1_Git(ref common.ReferenceCallback) common.Open Format: "", }, }, + "initializeSubmodules": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"url", "revision"}, }, @@ -5380,6 +5422,12 @@ func schema_pkg_apis_core_v1alpha1_ResolvedGitSource(ref common.ReferenceCallbac Format: "", }, }, + "initializeSubmodules": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"url", "revision", "type"}, },