nic-chen commented on a change in pull request #3092:
URL: https://github.com/apache/apisix/pull/3092#discussion_r547060646



##########
File path: apisix/control/v1.lua
##########
@@ -14,11 +14,33 @@
 -- See the License for the specific language governing permissions and
 -- limitations under the License.
 --
+local core = require("apisix.core")
+local plugin = require("apisix.plugin")
+
+
 local _M = {}
 
 
 function _M.schema()
-    return 200, {}
+    local schema = {
+        main = {
+            global_rule = core.schema.global_rule,
+            route = core.schema.route,
+            service = core.schema.service,
+            ssl = core.schema.ssl,
+            stream_route = core.schema.stream_route,
+            upstream = core.schema.upstream,
+        },

Review comment:
       how about could use `core.schema` as main ?
   
   There will be redundant data, but no data will be missed, and there is no 
need to modify the code here after adding a new schema.
   




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to