본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

응답 트랜스포머 플러그인 설정 레퍼런스

원문 보기 위키 갱신

응답 트랜스포머 플러그인 설정 레퍼런스 (Response Transformer Plugin Configuration Reference)

이 문서는 Response Transformer 플러그인의 설정 옵션을 스키마 형태로 정리한 레퍼런스예요. 응답에 헤더나 JSON 속성을 추가(add)하고 덧붙이고(append), 삭제하고(remove), 이름을 바꾸는(rename) 방법을 항목별로 확인할 수 있어요. JSON 값을 다룰 때 타입을 지정하는 json_types 같은 세부 옵션도 함께 살펴보세요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "add": {
          "properties": {
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json_types": {
              "default": [],
              "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.",
              "items": {
                "enum": [
                  "boolean",
                  "number",
                  "string"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "append": {
          "properties": {
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json_types": {
              "default": [],
              "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.",
              "items": {
                "enum": [
                  "boolean",
                  "number",
                  "string"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "remove": {
          "properties": {
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "rename": {
          "properties": {
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "replace": {
          "properties": {
            "headers": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json": {
              "default": [],
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "json_types": {
              "default": [],
              "description": "List of JSON type names. Specify the types of the JSON values returned when appending\nJSON properties. Each string element can be one of: boolean, number, or string.",
              "items": {
                "enum": [
                  "boolean",
                  "number",
                  "string"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object"
        }
      },
      "type": "object"
    },
    "consumer": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified has been authenticated. (Note that some plugins can not be restricted to consumers this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "consumer_group": {
      "additionalProperties": false,
      "description": "If set, the plugin will activate only for requests where the specified consumer group has been authenticated. (Note that some plugins can not be restricted to consumers groups this way.). Leave unset for the plugin to activate regardless of the authenticated Consumer Groups",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expressions": {
      "additionalProperties": true,
      "type": "object"
    },
    "protocols": {
      "default": [
        "grpc",
        "grpcs",
        "http",
        "https"
      ],
      "description": "A set of strings representing HTTP protocols.",
      "items": {
        "enum": [
          "grpc",
          "grpcs",
          "http",
          "https"
        ],
        "type": "string"
      },
      "type": "array"
    },
    "route": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "service": {
      "additionalProperties": false,
      "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}

관련 리소스

더 알아보기 (Learn more)