このページは、まだ日本語ではご利用いただけません。翻訳中です。
古いプラグインバージョンのドキュメントを閲覧しています。
構成
このプラグインはDBレスモードに対応しています。
パラメータ
このプラグインの設定で使用できるすべてのパラメータのリストは次のとおりです。
-
name or plugin
string requiredプラグイン名。この場合は
response-transformer-advanced
。- 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-
remove
record required-
json
array of typestring
List of property names. Remove the property from the JSON body if it is present.
-
headers
array of typestring
List of
headername[:value]
. If onlyheadername
is given, unset the header field with the givenheadername
. Ifheadername:value
is given, unset the header fieldheadername
when it has a specificvalue
. Ifvalue
starts and ends with a/
(slash character), then it is considered to be a regular expression. Note that in accordance with RFC 7230 multiple header values with the same header name are allowed if the entire field value for that header field is defined as a comma-separated list or the header field is aSet-Cookie
header field.
-
if_status
array of typestring
List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
rename
record required-
headers
array of typestring
List of
headername1:headername2
pairs. If a header withheadername1
exists andheadername2
is valid, rename header toheadername2
.
-
if_status
array of typestring
List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
replace
record required-
body
stringString with which to replace the entire response body.
-
json
array of typestring
List of property
name:value
pairs. If and only if the parameter is already present, replace its old value with the new one. Ignored if the parameter is not already present.
-
json_types
array of typestring
Must be one of:boolean
,number
,string
List of JSON type names. Specify the types of the JSON values returned when replacing JSON properties.
-
headers
array of typestring
List of
headername:value
pairs. If and only if the header is already set, replace its old value with the new one. Ignored if the header is not already set.
-
if_status
array of typestring
List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
add
record required-
json
array of typestring
List of
name:value
pairs. If and only if the property is not present, add a new property with the given value to the JSON body. Ignored if the property is already present.
-
json_types
array of typestring
Must be one of:boolean
,number
,string
List of JSON type names. Specify the types of the JSON values returned when adding a new JSON property.
-
headers
array of typestring
List of
headername:value
pairs. If and only if the header is not already set, set a new header with the given value. Ignored if the header is already set.
-
if_status
array of typestring
List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
append
record required-
json
array of typestring
List of
name:value
pairs. If the property is not present in the JSON body, add it with the given value. If it is already present, the two values (old and new) will be aggregated in an array.
-
json_types
array of typestring
Must be one of:boolean
,number
,string
List of JSON type names. Specify the types of the JSON values returned when appending JSON properties.
-
headers
array of typestring
List of
headername:value
pairs. If the header is not set, set it with the given value. If it is already set, a new header with the same name and the new value will be set.
-
if_status
array of typestring
List of response status codes or status code ranges to which the transformation will apply. Empty means all response codes.
-
-
allow
record required-
json
set of typestring
Set of parameter names. Only allowed parameters are present in the JSON response body.
-
-
transform
record required-
functions
array of typestring
Set of Lua functions to perform arbitrary transforms in a response JSON body.
-
if_status
array of typestring
List of response status codes or ranges to which the arbitrary transformation applies. Leaving empty implies that the transformations apply to all response codes.
-
json
array of typestring
Apply Lua functions to a particular list of JSON property
name
orname:value
pairs.
-
-
dots_in_keys
boolean default:true
Whether dots (for example,
customers.info.phone
) should be treated as part of a property name or used to descend into nested JSON objects. See Arrays and nested objects.
-