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

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

commit 91f08d66addaaf0e6c9ee02addb1a18430b2f945
Author: David Jencks <djen...@apache.org>
AuthorDate: Tue Jan 25 23:21:32 2022 -0800

    move Template to Kamelets
---
 pkg/apis/camel/v1/common_types.go                |  6 +++---
 pkg/apis/camel/v1/zz_generated.deepcopy.go       | 20 --------------------
 pkg/apis/camel/v1alpha1/kamelet_types.go         |  7 ++++++-
 pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go | 22 +++++++++++++++++++++-
 4 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/pkg/apis/camel/v1/common_types.go 
b/pkg/apis/camel/v1/common_types.go
index 5826a06..6b97918 100644
--- a/pkg/apis/camel/v1/common_types.go
+++ b/pkg/apis/camel/v1/common_types.go
@@ -175,9 +175,9 @@ type Flow struct {
 }
 
 // Template is an unstructured object representing a Kamelet template in 
YAML/JSON DSL
-type Template struct {
-       RawMessage `json:",inline"`
-}
+//type Template struct {
+//     RawMessage `json:",inline"`
+//}
 
 // RuntimeProvider --
 type RuntimeProvider string
diff --git a/pkg/apis/camel/v1/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1/zz_generated.deepcopy.go
index 76fa84a..69ddb11 100644
--- a/pkg/apis/camel/v1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1/zz_generated.deepcopy.go
@@ -1618,26 +1618,6 @@ func (in *Task) DeepCopy() *Task {
 }
 
 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
-func (in *Template) DeepCopyInto(out *Template) {
-       *out = *in
-       if in.RawMessage != nil {
-               in, out := &in.RawMessage, &out.RawMessage
-               *out = make(RawMessage, len(*in))
-               copy(*out, *in)
-       }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Template.
-func (in *Template) DeepCopy() *Template {
-       if in == nil {
-               return nil
-       }
-       out := new(Template)
-       in.DeepCopyInto(out)
-       return out
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
 func (in *TraitConfiguration) DeepCopyInto(out *TraitConfiguration) {
        *out = *in
        if in.RawMessage != nil {
diff --git a/pkg/apis/camel/v1alpha1/kamelet_types.go 
b/pkg/apis/camel/v1alpha1/kamelet_types.go
index 5674c2f..63895e0 100644
--- a/pkg/apis/camel/v1alpha1/kamelet_types.go
+++ b/pkg/apis/camel/v1alpha1/kamelet_types.go
@@ -45,7 +45,7 @@ var (
 type KameletSpec struct {
        Definition *JSONSchemaProps     `json:"definition,omitempty"`
        Sources    []camelv1.SourceSpec `json:"sources,omitempty"`
-       Template   *camelv1.Template    `json:"template,omitempty"`
+       Template   *Template    `json:"template,omitempty"`
        // Deprecated: use template
        Flow          *camelv1.Flow               `json:"flow,omitempty"`
        Authorization *AuthorizationSpec          
`json:"authorization,omitempty"`
@@ -53,6 +53,11 @@ type KameletSpec struct {
        Dependencies  []string                    
`json:"dependencies,omitempty"`
 }
 
+// Template is an unstructured object representing a Kamelet template in 
YAML/JSON DSL
+type Template struct {
+       RawMessage `json:",inline"`
+}
+
 type EventTypeSpec struct {
        MediaType string           `json:"mediaType,omitempty"`
        Schema    *JSONSchemaProps `json:"schema,omitempty"`
diff --git a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go 
b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
index e6ec185..e760a6b 100644
--- a/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/camel/v1alpha1/zz_generated.deepcopy.go
@@ -626,7 +626,7 @@ func (in *KameletSpec) DeepCopyInto(out *KameletSpec) {
        }
        if in.Template != nil {
                in, out := &in.Template, &out.Template
-               *out = new(v1.Template)
+               *out = new(Template)
                (*in).DeepCopyInto(*out)
        }
        if in.Flow != nil {
@@ -708,3 +708,23 @@ func (in RawMessage) DeepCopy() RawMessage {
        in.DeepCopyInto(out)
        return *out
 }
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, 
writing into out. in must be non-nil.
+func (in *Template) DeepCopyInto(out *Template) {
+       *out = *in
+       if in.RawMessage != nil {
+               in, out := &in.RawMessage, &out.RawMessage
+               *out = make(RawMessage, len(*in))
+               copy(*out, *in)
+       }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, 
creating a new Template.
+func (in *Template) DeepCopy() *Template {
+       if in == nil {
+               return nil
+       }
+       out := new(Template)
+       in.DeepCopyInto(out)
+       return out
+}

Reply via email to