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

Kong 서비스 가상화 플러그인 구성 참조

원문 보기 위키 갱신

Kong 서비스 가상화 플러그인 구성 참조 (Kong Service Virtualization Plugin Configuration Reference)

이 문서는 Kong Service Virtualization 플러그인의 구성 옵션을 JSON 스키마 형태로 정리한 참조 자료예요. virtual_tests 배열에서 테스트 이름, 요청 해시, HTTP 메서드, Base64로 인코딩된 가상 응답, Content-Type, 상태 코드처럼 가상 요청 매칭에 필요한 필드를 정의하는 방법을 설명해요. 아울러 route와 service 옵션을 사용해 플러그인이 특정 라우트나 서비스에서만 동작하도록 범위를 한정하는 방법도 다뤄요. 각 필드의 필수 여부와 데이터 타입을 한눈에 확인하고 싶을 때 유용한 문서예요

출처: 문서

본문

{
  "properties": {
    "config": {
      "properties": {
        "virtual_tests": {
          "description": "A JSON array as string representation of the plugin's configurable fields.",
          "items": {
            "properties": {
              "name": {
                "description": "Represents a human readable test case name.",
                "type": "string"
              },
              "requestHash": {
                "description": "Represents the Sha256 of the HTTP Body or QUERY Parameters of your request.",
                "type": "string"
              },
              "requestHttpMethod": {
                "description": "Represents the HTTP method associated to the virtual request.",
                "type": "string"
              },
              "response": {
                "description": "Represents the Base64 encoded virtual response to send after successful virtual request match.",
                "type": "string"
              },
              "responseContentType": {
                "description": "Represents the Content-Type of the HTTP response after successful virtual request match.",
                "type": "string"
              },
              "responseHttpStatus": {
                "description": "Represents the HTTP response to send consumers after successful virtual match.",
                "type": "number"
              }
            },
            "required": [
              "name",
              "requestHash",
              "requestHttpMethod",
              "response",
              "responseContentType",
              "responseHttpStatus"
            ],
            "type": "object"
          },
          "type": "array"
        }
      },
      "required": [],
      "type": "object"
    },
    "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"
        }
      },
      "required": [],
      "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"
        }
      },
      "required": [],
      "type": "object"
    }
  },
  "required": []
}

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.