You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/12/09 10:21:34 UTC

[camel-k] branch master updated: chore(api): make KameletSpec.Authorization a pointer so it can be omitted

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new 13f6e17  chore(api): make KameletSpec.Authorization a pointer so it can be omitted
13f6e17 is described below

commit 13f6e171332c9185346dd1be3ba12fbcabfd5d6b
Author: Luca Burgazzoli <lb...@gmail.com>
AuthorDate: Wed Dec 9 10:41:52 2020 +0100

    chore(api): make KameletSpec.Authorization a pointer so it can be omitted
---
 pkg/apis/camel/v1alpha1/kamelet_types.go         | 2 +-
 pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pkg/apis/camel/v1alpha1/kamelet_types.go b/pkg/apis/camel/v1alpha1/kamelet_types.go
index 7b356c1..252d733 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_types.go
+++ b/pkg/apis/camel/v1alpha1/kamelet_types.go
@@ -36,7 +36,7 @@ type KameletSpec struct {
 	Definition    JSONSchemaProps             `json:"definition,omitempty"`
 	Sources       []camelv1.SourceSpec        `json:"sources,omitempty"`
 	Flow          *camelv1.Flow               `json:"flow,omitempty"`
-	Authorization AuthorizationSpec           `json:"authorization,omitempty"`
+	Authorization *AuthorizationSpec          `json:"authorization,omitempty"`
 	Types         map[EventSlot]EventTypeSpec `json:"types,omitempty"`
 	Dependencies  []string                    `json:"dependencies,omitempty"`
 }
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
index d64ff02..627e680 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
@@ -602,7 +602,11 @@ func (in *KameletSpec) DeepCopyInto(out *KameletSpec) {
 		*out = new(v1.Flow)
 		(*in).DeepCopyInto(*out)
 	}
-	out.Authorization = in.Authorization
+	if in.Authorization != nil {
+		in, out := &in.Authorization, &out.Authorization
+		*out = new(AuthorizationSpec)
+		**out = **in
+	}
 	if in.Types != nil {
 		in, out := &in.Types, &out.Types
 		*out = make(map[EventSlot]EventTypeSpec, len(*in))