juzhiyuan commented on a change in pull request #2091:
URL: https://github.com/apache/apisix/pull/2091#discussion_r473760227
##########
File path: apisix/plugins/ip-restriction.lua
##########
@@ -27,21 +27,31 @@ local lrucache = core.lrucache.new({
local schema = {
type = "object",
- properties = {
- whitelist = {
- type = "array",
- items = {type = "string", anyOf = core.schema.ip_def},
- minItems = 1
+ oneOf = {
+ {
+ title = "whitelist",
+ properties = {
+ whitelist = {
+ type = "array",
+ items = {type = "string", anyOf = core.schema.ip_def},
Review comment:
```json
{
"type": "object",
"oneOf": [
{
"title": "whitelist",
"properties": {
"whitelist": {
"title": "",
"type": "array",
"items": {
"anyOf": [
{
"title": "Pattern 1",
"type": "string",
"pattern": "This is Pattern"
}
]
},
"minItems": 1
}
},
"required": ["whitelist"],
"additionalProperties": false
}
]
}
```
This schema is ok for me.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]