spacewander commented on a change in pull request #5028:
URL: https://github.com/apache/apisix/pull/5028#discussion_r733275337



##########
File path: apisix/cli/ops.lua
##########
@@ -174,6 +174,51 @@ local config_schema = {
                         },
                     }
                 },
+                proxy_cache = {
+                    type = "object",
+                    properties = {
+                        zones = {
+                            type = "array",
+                            minItems = 1,
+                            items = {
+                                type = "object",
+                                properties = {
+                                    name = {
+                                        type = "string",
+                                    },
+                                    memory_size = {
+                                        type = "string",
+                                    },
+                                    disk_size = {
+                                        type = "string",
+                                    },
+                                    disk_path = {
+                                        type = "string",
+                                    },
+                                    cache_levels = {
+                                        type = "string",
+                                    },
+                                },
+                                required = { "name" },

Review comment:
       We can use oneOf directly, like:
   ```
       oneOf = {
           {required = {"type", "nodes"}},
           {required = {"type", "service_name", "discovery_type"}},
       },
   ```
   
   The required fields don't depend on the name.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to