juzhiyuan opened a new issue #2085: URL: https://github.com/apache/apisix/issues/2085
refer to https://github.com/apache/apisix/issues/2082#issue-681772868 ## Currently ```json { "oneOf":[ { "required":[ "whitelist" ] }, { "required":[ "blacklist" ] } ], "properties":{ "blacklist":{ "items":{ "anyOf":[ { "pattern":"^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" }, { "pattern":"^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}$" }, { "pattern":"^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?$" }, { "pattern":"^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$" } ], "type":"string" }, "minItems":1, "type":"array" }, "whitelist":{ "items":{ "anyOf":[ { "pattern":"^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" }, { "pattern":"^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}$" }, { "pattern":"^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?$" }, { "pattern":"^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$" } ], "type":"string" }, "minItems":1, "type":"array" } }, "type":"object" } ``` ## Expected ```json { "oneOf": [ { "title": "whitelist", "properties": { "whitelist": { "minItems": 1, "type": "array", "items": { "anyOf": [ { "title": "规则1", "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" }, { "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}$" }, { "pattern": "^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?$" }, { "pattern": "^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$" } ], "type": "string" } } }, "required": ["whitelist"] }, { "title": "blacklist", "properties": { "blacklist": { "items": { "anyOf": [ { "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" }, { "pattern": "^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/[0-9]{1,2}$" }, { "pattern": "^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?$" }, { "pattern": "^([a-fA-F0-9]{0,4}:){0,8}(:[a-fA-F0-9]{0,4}){0,8}([a-fA-F0-9]{0,4})?/[0-9]{1,3}$" } ], "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["blacklist"] } ], "type": "object" } ``` ## Notes 1. The Dashboard needs to use textarea instead of text input. ---------------------------------------------------------------- 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]
