From d3b53c71ba2b22eda33e03338d2159624cbb25af Mon Sep 17 00:00:00 2001 From: vishmi Date: Wed, 17 Jul 2024 13:07:16 +0530 Subject: [PATCH] Updated synapse handlers configurations --- .../creating-synapse-handlers.md | 16 ++-- en/docs/reference/config-catalog.md | 77 +++++++++++++++++++ .../data/configs.json | 31 ++++++++ 3 files changed, 119 insertions(+), 5 deletions(-) diff --git a/en/docs/integrate/develop/customizations/creating-synapse-handlers.md b/en/docs/integrate/develop/customizations/creating-synapse-handlers.md index ee53b2b0b8..20ab5154f9 100644 --- a/en/docs/integrate/develop/customizations/creating-synapse-handlers.md +++ b/en/docs/integrate/develop/customizations/creating-synapse-handlers.md @@ -90,8 +90,14 @@ To deploy your custom synapse handler in WSO2 Micro Integrator, bundle the artif To engage the deployed Synapse handler, you need to add the following configuration to the `deployment.toml` file. -```toml -[[synapse_handlers]] -name = "" -class = "." -``` +``` tab="Format" + [synapse_handlers.] + enabled = true + class = "." + ``` + + ``` tab="Example" + [synapse_handlers.custom_handler] + enabled=true + class="org.wso2.carbon.apimgt.gateway.handlers.custom.customer_handler" + ``` diff --git a/en/docs/reference/config-catalog.md b/en/docs/reference/config-catalog.md index 26a2a1f43c..59a75a9c81 100644 --- a/en/docs/reference/config-catalog.md +++ b/en/docs/reference/config-catalog.md @@ -14100,3 +14100,80 @@ excludeResponseHeaders = "" + + +## Global handler configurations + + +
+
+
+
+ + + +
+
+
[synapse_handlers.custom_handler_name]
+enabled=true
+class="org.wso2.carbon.apimgt.gateway.handlers.custom.customer_handler"
+
+
+
+
+
+
+ [synapse_handlers.custom_handler_name] + +

+ configuration used to define or enable disable global handler. +

+
+
+
+
+ enabled +
+
+
+

+ boolean + +

+
+ Default: +
+ +
+
+

Enable or disable a defined global handler.

+
+
+
+
+ class +
+
+
+

+ string + Required +

+
+ Default: +
+ +
+
+

Fully qualified class name of the global handler.

+
+
+
+
+
+
+
+
+
+
+ diff --git a/en/tools/config-catalog-generator/data/configs.json b/en/tools/config-catalog-generator/data/configs.json index de4e68b711..33418d9838 100755 --- a/en/tools/config-catalog-generator/data/configs.json +++ b/en/tools/config-catalog-generator/data/configs.json @@ -5243,6 +5243,37 @@ } ], "exampleFile": "transport-headers.toml" + }, + + { + "title": "Global handler configurations", + "options": [ + { + "name": "synapse_handlers.custom_handler_name", + "required": false, + "description": "configuration used to define or enable disable global handler.", + "params": [ + { + "name": "enabled", + "type": "boolean", + "required": false, + "default": "", + "possible": "", + "description": "Enable or disable a defined global handler." + }, + { + "name": "class", + "type": "string", + "required": true, + "default": "", + "possible": "", + "description": "Fully qualified class name of the global handler." + } + ] + } + ], + "exampleFile": "synapse_handlers.toml" } ] } +