davsclaus commented on a change in pull request #331:
URL: https://github.com/apache/camel-kamelets/pull/331#discussion_r645640129



##########
File path: 
library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/InflightProtobufSchemaResolver.java
##########
@@ -0,0 +1,25 @@
+package org.apache.camel.kamelets.utils.serialization;

Review comment:
       Add ASF license header

##########
File path: 
library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/serialization/InflightProtobufSchemaResolver.java
##########
@@ -0,0 +1,25 @@
+package org.apache.camel.kamelets.utils.serialization;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.FormatSchema;
+import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchema;
+import com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufSchemaLoader;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.jackson.SchemaResolver;
+
+public class InflightProtobufSchemaResolver implements SchemaResolver {
+
+    @Override
+    public FormatSchema resolve(Exchange exchange) {
+        String schemaStr = (String) exchange.getProperty("schema");

Review comment:
       Should the schema property be removed also, otherwise it leaks out of 
the kamelet.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to