このページは、まだ日本語ではご利用いただけません。翻訳中です。
古いプラグインバージョンのドキュメントを閲覧しています。
構成
このプラグインはDBレスモードに対応しています。
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
name or plugin
string requiredプラグイン名。この場合は
request-validator。- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
nameです。 - Kubernetes で KongPlugin オブジェクトを使用する場合、フィールドは
pluginです。
- Kong Admin API、Kong Konnect API、宣言型構成、または decK ファイルを使用する場合、フィールドは
-
service.name or service.id
stringプラグインが対象とするサービス名または ID。最上位の
/pluginsエンドポイント. からプラグインをサービスに追加する場合は、これらのパラメータのいずれかを設定してください/services/{serviceName|Id}/pluginsを使用する場合は必要ありません。 -
route.name or route.id
stringプラグインがターゲットとするルート名または ID。最上位の
/pluginsエンドポイント. を通るルートにプラグインを追加する場合は、これらのパラメータのいずれかを設定してください/routes/{routeName|Id}/pluginsを使用する場合は必要ありません。 -
consumer.name or consumer.id
stringプラグインがターゲットとするコンシューマーの名前または ID。 最上位の
/pluginsエンドポイント. からコンシューマーにプラグインを追加する場合は、これらのパラメーターのいずれかを設定してください/consumers/{consumerName|Id}/pluginsを使用する場合は必要ありません。 -
enabled
boolean default:trueこのプラグインが適用されるかどうか。
-
config
record required-
body_schema
stringThe request body schema specification. One of
body_schemaorparameter_schemamust be specified.
-
allowed_content_types
set of typestringdefault:application/jsonList of allowed content types. The value can be configured with the
charsetparameter. For example,application/json; charset=UTF-8.Notes:
- Body validation is only done for
application/jsonand 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-8is to be considered valid forapplication/json.
- Body validation is only done for
-
version
string required default:kongMust be one of:kong,draft4Which validator to use. Supported values are
kong(default) for using Kong’s own schema validator, ordraft4for using a JSON Schema Draft 4-compliant validator.
-
parameter_schema
array of typerecordArray of parameter validator specifications. For details and examples, see Parameter Schema Definition. One of
body_schemaorparameter_schemamust be specified.-
in
string required Must be one of:query,header,path
-
name
string required
-
required
boolean required
-
style
string Must be one of:label,form,matrix,simple,spaceDelimited,pipeDelimited,deepObject
-
explode
boolean
-
schema
string
-
-
verbose_response
boolean required default:falseIf enabled, the plugin returns more verbose and detailed validation errors (for example, the name of the required field that is missing).
-