liuxiran commented on a change in pull request #1081:
URL: https://github.com/apache/apisix-dashboard/pull/1081#discussion_r546313922



##########
File path: api/filter/schema.go
##########
@@ -136,6 +144,25 @@ func handleSpecialField(resource string, reqBody []byte) 
([]byte, error) {
        return reqBody, nil
 }
 
+func handleDefaultValue(resource string, reqBody []byte) ([]byte, error) {
+       // go jsonschema lib doesn't support setting default values, so we need 
to set for some fields necessary
+       if resource == "routes" {
+               var route map[string]interface{}
+               err := json.Unmarshal(reqBody, &route)
+               if err != nil {
+                       return reqBody, fmt.Errorf("read request body failed: 
%s", err)
+               }
+               if _, ok := route["status"]; !ok {

Review comment:
       > Q3: Could we debug an offline route in OnlineDebug feature? I'm not 
sure if OnlineDebug means debug online routes 
   
   we can debug a online route with `APISIX_IP:PORT/url` via Online debug 
function
   and we can debug a offline route with `upstream_IP:PORT/url` via Online 
debug function




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


Reply via email to