-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.lua
More file actions
35 lines (32 loc) · 886 Bytes
/
schema.lua
File metadata and controls
35 lines (32 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local typedefs = require "kong.db.schema.typedefs"
local colon_string_array = {
type = "array",
default = {},
required = true,
elements = {type = "string", match = "^[^:]+:.*$"}
}
local colon_string_record = {
type = "record",
fields = {
{list = colon_string_array}
}
}
return {
name = "multi-header-based-route",
fields = {
{consumer = typedefs.no_consumer},
{protocols = typedefs.protocols_http},
{
config = {
type = "record",
fields = {
{headerdetails = colon_string_record},
{targetdetails = colon_string_record},
{operator = {type = "string"}},
{header_count = {type = "number"}},
{default_host = {type = "string"}}
}
}
}
}
}