Kong · Schema
MockingPluginConfig
API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| config | object | |
| consumer | object | 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 acti |
| name | object | |
| protocols | array | A set of strings representing HTTP protocols. |
| route | object | 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. |
| service | object | 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. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/MockingPluginConfig",
"title": "MockingPluginConfig",
"x-speakeasy-entity": "PluginMocking",
"properties": {
"config": {
"type": "object",
"properties": {
"api_specification": {
"description": "The contents of the specification file. You must use this option for hybrid or DB-less mode. You can include the full specification as part of the configuration. In Kong Manager, you can copy and paste the contents of the spec directly into the `Config.Api Specification` text field.",
"type": "string"
},
"api_specification_filename": {
"description": "The path and name of the specification file loaded into Kong Gateway's database. You cannot use this option for DB-less or hybrid mode.",
"type": "string"
},
"custom_base_path": {
"description": "The base path to be used for path match evaluation. This value is ignored if `include_base_path` is set to `false`.",
"type": "string"
},
"include_base_path": {
"description": "Indicates whether to include the base path when performing path match evaluation.",
"type": "boolean",
"default": false
},
"included_status_codes": {
"description": "A global list of the HTTP status codes that can only be selected and returned.",
"type": "array",
"items": {
"type": "integer"
}
},
"max_delay_time": {
"description": "The maximum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be greater than the `min_delay_time`.",
"type": "number",
"default": 1
},
"min_delay_time": {
"description": "The minimum value in seconds of delay time. Set this value when `random_delay` is enabled and you want to adjust the default. The value must be less than the `max_delay_time`.",
"type": "number",
"default": 0.001
},
"random_delay": {
"description": "Enables a random delay in the mocked response. Introduces delays to simulate real-time response times by APIs.",
"type": "boolean",
"default": false
},
"random_examples": {
"description": "Randomly selects one example and returns it. This parameter requires the spec to have multiple examples configured.",
"type": "boolean",
"default": false
},
"random_status_code": {
"description": "Determines whether to randomly select an HTTP status code from the responses of the corresponding API method. The default value is `false`, which means the minimum HTTP status code is always selected and returned.",
"type": "boolean",
"default": false
}
}
},
"consumer": {
"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.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
},
"name": {
"const": "mocking"
},
"protocols": {
"description": "A set of strings representing HTTP protocols.",
"type": "array",
"items": {
"enum": [
"grpc",
"grpcs",
"http",
"https"
],
"type": "string"
},
"format": "set",
"default": [
"grpc",
"grpcs",
"http",
"https"
]
},
"route": {
"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.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
},
"service": {
"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.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
}
}
}