このページは、まだ日本語ではご利用いただけません。翻訳中です。
古いプラグインバージョンのドキュメントを閲覧しています。
構成
このプラグインはDBレスモードに対応しています。
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
string required
プラグイン名。この場合は
request-validator
。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
name
です。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
plugin
です。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
string
プラグインが対象とするサービス名または ID。最上位の
/plugins
エンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/plugins
を使用する場合は必要ありません。 -
string
プラグインがターゲットとするルート名または ID。最上位の
/plugins
エンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/plugins
を使用する場合は必要ありません。 -
string
プラグインがターゲットとするコンシューマーの名前または ID。 最上位の
/plugins
エンドポイント. からコンシューマーにプラグインを追加する場合は、これらのパラメーターのいずれかを設定してください/consumers/{consumerName|Id}/plugins
を使用する場合は必要ありません。 -
boolean default:
true
このプラグインが適用されるかどうか。
-
record required
-
string
The request body schema specification. One of
body_schema
orparameter_schema
must be specified.
-
set of type
string
default:application/json
List of allowed content types. The value can be configured with the
charset
parameter. For example,application/json; charset=UTF-8
.Notes:
- Body validation is only done for
application/json
and skipped for any other allowed content types. - Only one parameter is supported. If a request sends more than one parameter with the Content-Type header, only the first parameter is evaluated and the rest are truncated. The type, subtype, parameter names, and the value of the charset parameter are not case sensitive based on the RFC explanation.
- Parameter does not need to be explicitly configured to allow a request passed with a parameter content-type. The parameter is checked only if the request carries the parameter and it’s explicitly configured. For example, a request with
application/json; charset=UTF-8
is to be considered valid forapplication/json
.
- Body validation is only done for
-
string required default:
kong
Must be one of:kong
,draft4
Which validator to use. Supported values are
kong
(default) for using Kong’s own schema validator, ordraft4
for using a JSON Schema Draft 4-compliant validator.
-
array of type
record
Array of parameter validator specifications. For details and examples, see Parameter Schema Definition. One of
body_schema
orparameter_schema
must be specified.
-
boolean required default:
false
If enabled, the plugin returns more verbose and detailed validation errors (for example, the name of the required field that is missing).
-