Skip to content

Commit 22ee20c

Browse files
authored
feat: make A/B test APISIX easier by removing "additionalProperties = false" (#4797)
Signed-off-by: spacewander <[email protected]>
1 parent cd34279 commit 22ee20c

37 files changed

+155
-611
lines changed

apisix/plugins/authz-casbin.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ local schema = {
3636
{required = {"model_path", "policy_path", "username"}},
3737
{required = {"model", "policy", "username"}}
3838
},
39-
additionalProperties = false
4039
}
4140

4241
local metadata_schema = {
@@ -46,7 +45,6 @@ local metadata_schema = {
4645
policy = {type = "string"},
4746
},
4847
required = {"model", "policy"},
49-
additionalProperties = false
5048
}
5149

5250
local _M = {

apisix/plugins/basic-auth.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ local schema = {
3131
type = "object",
3232
title = "work with route or service object",
3333
properties = {},
34-
additionalProperties = false,
3534
}
3635

3736
local consumer_schema = {
@@ -42,7 +41,6 @@ local consumer_schema = {
4241
password = { type = "string" },
4342
},
4443
required = {"username", "password"},
45-
additionalProperties = false,
4644
}
4745

4846
local plugin_name = "basic-auth"

apisix/plugins/batch-requests.lua

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ local attr_schema = {
3737
default = default_uri
3838
}
3939
},
40-
additionalProperties = false,
4140
}
4241

4342
local schema = {
4443
type = "object",
45-
additionalProperties = false,
4644
}
4745

4846
local default_max_body_size = 1024 * 1024 -- 1MiB
@@ -56,7 +54,6 @@ local metadata_schema = {
5654
default = default_max_body_size,
5755
},
5856
},
59-
additionalProperties = false,
6057
}
6158

6259
local method_schema = core.table.clone(core.schema.method_schema)

apisix/plugins/echo.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ local schema = {
4747
{required = {"after_body"}}
4848
},
4949
minProperties = 1,
50-
additionalProperties = false,
5150
}
5251

5352
local plugin_name = "echo"

apisix/plugins/example-plugin.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ local metadata_schema = {
3838
skey = {type = "string"},
3939
},
4040
required = {"ikey", "skey"},
41-
additionalProperties = false,
4241
}
4342

4443
local plugin_name = "example-plugin"

apisix/plugins/hmac-auth.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ local schema = {
4545
type = "object",
4646
title = "work with route or service object",
4747
properties = {},
48-
additionalProperties = false,
4948
}
5049

5150
local consumer_schema = {
@@ -83,7 +82,6 @@ local consumer_schema = {
8382
}
8483
},
8584
required = {"access_key", "secret_key"},
86-
additionalProperties = false,
8785
}
8886

8987
local _M = {

apisix/plugins/http-logger.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ local metadata_schema = {
5656
properties = {
5757
log_format = log_util.metadata_schema_log_format,
5858
},
59-
additionalProperties = false,
6059
}
6160

6261

apisix/plugins/ip-restriction/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ local schema = {
4949
{required = {"whitelist"}},
5050
{required = {"blacklist"}},
5151
},
52-
additionalProperties = false,
5352
}
5453

5554

apisix/plugins/jwt-auth.lua

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,12 @@ local lrucache = core.lrucache.new({
3636

3737
local schema = {
3838
type = "object",
39-
additionalProperties = false,
4039
properties = {},
4140
}
4241

4342
local consumer_schema = {
4443
type = "object",
4544
-- can't use additionalProperties with dependencies
46-
-- additionalProperties = false,
4745
properties = {
4846
key = {type = "string"},
4947
secret = {type = "string"},

apisix/plugins/kafka-logger.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ local metadata_schema = {
7070
properties = {
7171
log_format = log_util.metadata_schema_log_format,
7272
},
73-
additionalProperties = false,
7473
}
7574

7675
local _M = {

0 commit comments

Comments
 (0)