Clarification regarding endpoint schema

23 views
Skip to first unread message

Vinay C N

unread,
Jan 13, 2025, 1:59:52 AM1/13/25
to KrakenD Community
Hi KrakenD Team,

I came across the following configuration in the endpoint_extra_config schema "schema-link"

"modifier/request-body-generator": {
      "$ref": "modifier/body-generator.json"
    }

However, the documentation specifies that the scope for this feature is Backend "doc". Could you please clarify this discrepancy and confirm whether the modifier/request-body-generator can be used in the endpoint_extra_config at the endpoint level or if it is strictly for backend configuration?

Looking forward to your guidance.

Best regards,
Vinay


Jorge Tarrero

unread,
Jan 13, 2025, 5:18:15 AM1/13/25
to KrakenD Community, Vinay C N
Hi Vinay,

You're right, the "modifier/request-body-generator" is documented under the "backend" scope, but it's actually also available in the "endpoint" scope as specified in the JSON schema. It seems there's a small inconsistency in the documentation that we’ll double-check.

I can confirm the "modifier/request-body-generator" works at the endpoint level. Here's an example (based on the one in the docs):

{
"endpoint": "/req-generator/{id}",
"method": "POST",
"input_headers": [
"Content-Type"
],
"extra_config": {
"modifier/request-body-generator": {
"path": "./body.json.tmpl",
"content_type": "application/json",
"debug": true
}
},
"backend": [
{
"url_pattern": "/__debug/one/{id}",
"method": "POST",
"encoding": "json",
"host": [
]
},
{
"url_pattern": "/__debug/two/{id}",
"method": "POST",
"encoding": "json",
"host": [
]
}
]
}

In this example, both of the backends are getting the same body generated at endpoint level.

Thanks for pointing this out, let me know if you have further questions!

Regards,
Jorge

Vinay C N

unread,
Jan 15, 2025, 10:44:43 PM1/15/25
to KrakenD Community, Jorge Tarrero, Vinay C N
Hi Jorge,

Thank you for the clarification regarding the confusion.. i have few more curios
Opentelemetry schema for endpoint have quite few extra fields when it compared to documentation should i rely on the documentation or the schema. And
I din't find any docs regarding the EE plugins categorised under http-client and http-server,  could you please clarify the plugins category 

Jorge Tarrero

unread,
Jan 16, 2025, 3:43:53 AM1/16/25
to KrakenD Community, Vinay C N, Jorge Tarrero
Hi Vinay,

As a rule of thumb, you should always rely on the official documentation. In this particular case, there are config options like the global.exporters_override that appear in the schema, but since they are enterprise-only features, they appear in the EE version of the documentation, for example: https://www.krakend.io/docs/enterprise/telemetry/opentelemetry-by-endpoint/#exporters_override 

Regarding the http-client and http-server sections in the schema, there's related documentation here and here . If you need more info about an specific plugin, we do have docs about them too, for example the ip-filtering plugin

Reply all
Reply to author
Forward
0 new messages