davsclaus commented on code in PR #30986:
URL: https://github.com/apache/camel/pull/30986#discussion_r4723904522


##########
components/camel-jsonata/src/main/java/org/apache/camel/component/jsonata/JsonataConstants.java:
##########
@@ -29,6 +29,10 @@ public final class JsonataConstants {
               javaType = "String")
     public static final String JSONATA_RESOURCE_URI = 
"CamelJsonataResourceUri";
 
+    /**
+     * @deprecated not used: the producer does not read this header.
+     */
+    @Deprecated(since = "4.24.0")

Review Comment:
   No change here, I think: the producer never read `CamelJsonataContext`, so 
it was never a documented header of the component, and adding `@Metadata` would 
list a header that does nothing in the catalog, the doc page and the endpoint 
DSL. The `@Deprecated` constant and the upgrade-guide entry cover Java users 
who referenced it.
   
   _Claude Code on behalf of Claus Ibsen_



##########
components/camel-jsonata/src/test/java/org/apache/camel/component/jsonata/JsonataExpressionResourceTest.java:
##########
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonata;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.camel.CatalogCamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+import tools.jackson.databind.JsonNode;
+import tools.jackson.databind.json.JsonMapper;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * When the producer opens the resource of the endpoint, and the 
allowContextMapAll option that jsonata does not use.

Review Comment:
   Fixed in bbe86ce6fcfb: the class Javadoc now reads "Tests that the producer 
opens the resource of the endpoint only when no header replaces it, and that 
the deprecated allowContextMapAll option, which jsonata never uses, still 
works."
   
   _Claude Code on behalf of Claus Ibsen_



##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -693,6 +693,15 @@ Before, its lock failed with an `OptimisticLockException`, 
and the poll was roll
 
 Other JPA providers, and the optimistic lock modes, are not affected.
 
+=== camel-jsonata - allowContextMapAll and CamelJsonataContext are deprecated

Review Comment:
   Fixed in bbe86ce6fcfb: the entry now also says that the producer opens the 
resource of the endpoint only when the `CamelJsonataResourceUri` header does 
not replace it, so with `allowTemplateFromHeader=true` an exchange that brings 
its expression in that header no longer fails when the endpoint resource cannot 
be found.
   
   _Claude Code on behalf of Claus Ibsen_



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to