You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/22 04:32:39 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #3092: feat: expose schema via control API

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



##########
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:
       There is some methods in `core.schema` can't be json encoded, like `core.schema.check`.




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