Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.2.0] Updated synapse handlers configurations #8221

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,16 @@ 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>"
```
=== "Format"
```toml
[synapse_handlers.<custom_handler_name>]
enabled = true
class = "<packageName>.<handlerName>"
```
=== "Example"
```toml
[synapse_handlers.custom_handler]
enabled=true
class="org.wso2.carbon.apimgt.gateway.handlers.custom.customer_handler"
```

79 changes: 78 additions & 1 deletion en/docs/reference/config-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14076,7 +14076,7 @@ key_password = "wso2carbon"</code></pre>
<div class="superfences-content">
<div class="mb-config-example">
<pre><code class="toml">[http_access_log]
useLogger = true</code></pre>
enabled = true</code></pre>
</div>
</div>
<div class="doc-wrapper">
Expand Down Expand Up @@ -14608,3 +14608,80 @@ excludeResponseHeaders = ""
</section>
</div>



## Global handler configurations


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

<input name="96" type="checkbox" id="_tab_96">
<label class="tab-selector" for="_tab_96"><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>

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