diff --git a/api/swagger-spec/oapi-v1.json b/api/swagger-spec/oapi-v1.json index 47fe5bca9d1b..fc6a6532ffaa 100644 --- a/api/swagger-spec/oapi-v1.json +++ b/api/swagger-spec/oapi-v1.json @@ -20051,8 +20051,7 @@ "id": "v1.BuildSource", "description": "BuildSource is the SCM used for the build.", "required": [ - "type", - "secrets" + "type" ], "properties": { "type": { diff --git a/pkg/build/api/v1/types.go b/pkg/build/api/v1/types.go index 4ba62362db91..61f83db392e0 100644 --- a/pkg/build/api/v1/types.go +++ b/pkg/build/api/v1/types.go @@ -252,7 +252,7 @@ type BuildSource struct { // secrets represents a list of secrets and their destinations that will // be used only for the build. - Secrets []SecretBuildSource `json:"secrets" protobuf:"bytes,8,rep,name=secrets"` + Secrets []SecretBuildSource `json:"secrets,omitempty" protobuf:"bytes,8,rep,name=secrets"` } // ImageSource describes an image that is used as source for the build