All Downloads are FREE. Search and download functionalities are using the official Maven repository.

.gateleen.gateleen-routing.2.1.11.source-code.gateleen_routing_schema_routing_rules Maven / Gradle / Ivy

There is a newer version: 2.1.12
Show newest version
{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "Routing rules",
	"additionalProperties": {
		"$ref": "#/definitions/Rule"
	},
	"properties": {},
	"definitions": {
		"Rule": {
			"description": "Describe how and where to forward a request.",
			"properties": {
				"url": {
					"description": "An absolute URL of the backend where the requests are forwarded.\nUse `$1`, `$2`, to insert the groups captured in the rule map index regexp.\nEither url or path must be specified, not both.",
					"format": "uri",
					"type": "string"
				},
				"path": {
					"description": "A local or storage path where the request are forwarded.\nUse `$1`, `$2`, to insert the groups captured in the rule map index regexp.\nEither url or path must be specified, not both.",
					"type": "string"
				},
				"storage": {
					"description": "Specify that requests must be directly forwarded to the resource storage, not via HTTP.\nThe value specifies the storage to use. It is storage suffix appended to Address.storageAddress()+\"-\".\nTypically \"main\", \"add-0\", \"add-1\", ...",
					"type": "string"
				},
				"description": {
					"description": "Documents the rule.",
					"type": "string"
				},
				"doc": {
					"description": "Link or reference to feature/specification documentation",
					"type": "string"
				},				
				"methods": {
					"description": "Restricts the HTTP methods concerned by this rule (`GET`, `PUT`, `POST`, `DELETE`).\nWhen absent, all methods are concerned.",
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"basicAuth": {
					"description": "To authenticate against the backend.",
					"$ref": "#/definitions/BasicAuth"
				},
				"oAuthId": {
					"description": "The id of the OAuth configuration to use to authenticate against the backend",
					"type": "string"
				},
				"proxyOptions": {
					"description": "Custom proxy options for this rule (forwarding)",
					"$ref": "#/definitions/ProxyOptions"
				},
				"profile": {
					"description": "The user profile fields to forward to backend as `X-User-*` HTTP header. Has o effect for local/storage forwarding.",
					"type": "array",
					"items": {
						"type": "string"
					}
				},
				"timeout": {
					"description": "The connection timeout in seconds when contacting the backend. Has no effect for local/storage forwarding.",
					"type": "integer",
					"default": 30
				},
				"keepAliveTimeout": {
                    "description": "The keep alive timeout for HTTP/1.1 connections.",
                    "type": "integer",
                    "default": 60
                },
				"connectionPoolSize": {
					"description": "The maximum number of concurrent connections to the backend. Has no effect for local/storage forwarding.",
					"type": "integer",
					"default": 50
				},
				"maxWaitQueueSize": {
                	"description": "The maximum number of requests allowed in the wait queue.",
                	"type": "integer",
                	"default": -1
                },
				"keepAlive": {
					"description": "Keeps the connection to the backend open.\nThis may improve performance but degrades the reliability in case of failure, requests can be lost.\nHas no effect for local/storage forwarding.",
					"default": false,
					"type": "boolean"
				},
				"logExpiry": {
					"description": "The number of seconds to keep track of the response body in the request log. Has no effect for local/storage forwarding.",
					"type": "integer",
					"default": "4*3600"
				},
				"translateStatus": {
					"description": "Mapping to transform backend HTTP status.",
					"type": "object",
					"additionalProperties": {
						"type": "integer"
					}
				},
				"staticHeaders": {
					"description": "Headers to set or override in the request sent to backend.",
					"type": "object",
					"additionalProperties": {
						"type": "string"
					}
				},
				"headers": {
					"description": "Manipulate (set / remove / replace) request headers - option to reference other header vales",
					"type": "array",
					"items": {
						"$ref": "#/definitions/HeaderFunction"
					}
				},
				"headersFilter": {
					"description": "Also filter requests based on header values (besides url and http methods). RegEx can be used to define a filter",
					"type": "string",
					"minLength": 1
				},
				"metricName": {
					"description": "Activates metric collection (JMX and crush-metrics.log) under this name. The metricName has to be unique over all rules",
					"type": "string",
					"minLength": 1
				},
				"expandOnBackend": {
					"description": "Should gateleen do the expansion or should it pass-through to the backend",
					"type": "boolean"
				},
				"deltaOnBackend": {
					"description": "Should gateleen do the delta handling or should it pass-through to the backend",
					"type": "boolean"
				},
				"storageExpand": {
					"description": "Should gateleen do the expansion or should it pass-through to the storage",
					"type": "boolean"
				}
			},
			"additionalProperties": false,
			"not": {
				"title": "Disallows use of deprecated 'staticHeaders' and new 'headers' at the same time. Also either one of 'basicAuth' or 'oAuthId' is allowed",
				"description": "Disallows use of deprecated 'staticHeaders' and new 'headers' at the same time. Also either one of 'basicAuth' or 'oAuthId' is allowed",
				"anyOf": [
					{
						"required": [
							"staticHeaders",
							"headers"
						]
					},
					{
						"required": [
							"basicAuth",
							"oAuthId"
						]
					}
				]
			}
		},
		"BasicAuth": {
			"properties": {
				"username": {
					"type": "string"
				},
				"password": {
					"type": "string"
				}
			},
			"required": [
				"username",
				"password"
			],
			"additionalProperties": false
		},
		"ProxyOptions": {
			"properties": {
				"type": {
					"type": "string",
					"enum": [
						"HTTP",
						"SOCKS4",
						"SOCKS5"
					]
				},
				"host": {
					"type": "string"
				},
				"port": {
					"type": "integer",
					"minimum": 0,
					"maximum": 65535
				},
				"username": {
					"type": "string"
				},
				"password": {
					"type": "string"
				}
			},
			"required": [
				"host",
				"port"
			],
			"additionalProperties": false
		},
		"HeaderFunction": {
			"properties": {
				"header": {
					"description": "the request-header name to manipulate (set, remove or conditional set)",
					"type": "string",
					"minLength": 1
				},
				"value": {
					"description": "the value to be set. null and empty string means 'remove the header'. value can contain other header names between single angular brackets which resolves to their values accordingly",
					"type": [
						"null",
						"string"
					]
				},
				"mode": {
					"description": "define a condition-mode. 'complete' sets the header value only if this header is not yet presen. 'overwrite' sets the header value only if the header is already present. Ignored if value is null or empty string",
					"type": "string",
					"enum": [
						"complete",
						"override"
					]
				}
			},
			"required": [
				"header",
				"value"
			]
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy