You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2023/02/09 07:16:15 UTC
[camel] branch main updated: [CAMEL-18305] Support writing rests definitions
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 936598bb9a6 [CAMEL-18305] Support writing rests definitions
936598bb9a6 is described below
commit 936598bb9a676f870c3252b17f7467541aaf94dd
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Feb 9 08:15:40 2023 +0100
[CAMEL-18305] Support writing rests definitions
---
.../src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java b/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java
index 3e6d9b25685..167b0de40ec 100644
--- a/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java
+++ b/core/camel-xml-io/src/main/java/org/apache/camel/xml/LwModelToXMLDumper.java
@@ -40,6 +40,8 @@ import org.apache.camel.model.RoutesDefinition;
import org.apache.camel.model.SendDefinition;
import org.apache.camel.model.ToDynamicDefinition;
import org.apache.camel.model.language.ExpressionDefinition;
+import org.apache.camel.model.rest.RestDefinition;
+import org.apache.camel.model.rest.RestsDefinition;
import org.apache.camel.spi.ModelToXMLDumper;
import org.apache.camel.spi.NamespaceAware;
import org.apache.camel.spi.annotations.JdkService;
@@ -175,6 +177,10 @@ public class LwModelToXMLDumper implements ModelToXMLDumper {
} else if (definition instanceof RouteDefinition route) {
extractor.accept(route);
writer.writeRouteDefinition(route);
+ } else if (definition instanceof RestsDefinition rests) {
+ writer.writeRestsDefinition(rests);
+ } else if (definition instanceof RestDefinition rest) {
+ writer.writeRestDefinition(rest);
}
return buffer.toString();