Skip to content

Commit

Permalink
Merge pull request #8220 from vishmi49/vishmi_4.1.0_docs
Browse files Browse the repository at this point in the history
[4.1.0] Updated synapse handlers configurations
  • Loading branch information
tharikaGitHub authored Jul 17, 2024
2 parents 8213525 + d3b53c7 commit fa820c8
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<handlerName>"
class = "<packageName>.<handlerName>"
```
``` tab="Format"
[synapse_handlers.<custom_handler_name>]
enabled = true
class = "<packageName>.<handlerName>"
```
``` tab="Example"
[synapse_handlers.custom_handler]
enabled=true
class="org.wso2.carbon.apimgt.gateway.handlers.custom.customer_handler"
```
77 changes: 77 additions & 0 deletions en/docs/reference/config-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14100,3 +14100,80 @@ excludeResponseHeaders = ""
</section>
</div>



## Global handler configurations


<div class="mb-config-catalog">
<section>
<div class="mb-config-options">
<div class="superfences-tabs">

<input name="95" type="checkbox" id="_tab_95">
<label class="tab-selector" for="_tab_95"><i class="icon fa fa-code"></i></label>
<div class="superfences-content">
<div class="mb-config-example">
<pre><code class="toml">[synapse_handlers.custom_handler_name]
enabled=true
class="org.wso2.carbon.apimgt.gateway.handlers.custom.customer_handler"
</code></pre>
</div>
</div>
<div class="doc-wrapper">
<div class="mb-config">
<div class="config-wrap">
<code>[synapse_handlers.custom_handler_name]</code>

<p>
configuration used to define or enable disable global handler.
</p>
</div>
<div class="params-wrap">
<div class="param">
<div class="param-name">
<span class="param-name-wrap"> <code>enabled</code> </span>
</div>
<div class="param-info">
<div>
<p>
<span class="param-type string"> boolean </span>

</p>
<div class="param-default">
<span class="param-default-value">Default: <code></code></span>
</div>

</div>
<div class="param-description">
<p>Enable or disable a defined global handler.</p>
</div>
</div>
</div><div class="param">
<div class="param-name">
<span class="param-name-wrap"> <code>class</code> </span>
</div>
<div class="param-info">
<div>
<p>
<span class="param-type string"> string </span>
<span class="badge-required">Required</span>
</p>
<div class="param-default">
<span class="param-default-value">Default: <code></code></span>
</div>

</div>
<div class="param-description">
<p>Fully qualified class name of the global handler.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>

31 changes: 31 additions & 0 deletions en/tools/config-catalog-generator/data/configs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}

0 comments on commit fa820c8

Please sign in to comment.