Baoyuantop commented on issue #12939:
URL: https://github.com/apache/apisix/issues/12939#issuecomment-3798082211

   This is a design limitation, not a bug. Only standard PATCH supports 
deleting attributes using null. The purpose of SubPath PATCH is to “fully 
update the data of that attribute,” not to delete the attribute. To remove the 
hosts attribute from a route, you should use standard PATCH:
   
   ```
   curl --request PATCH \
     --url http://127.0.0.1:9180/apisix/admin/routes/3d8eb989 \
     --header 'X-API-KEY: xxx' \
     --header 'Content-Type: application/json' \
     --data '{"hosts": null}'
   ```
   
   Additionally, I noticed inconsistencies in the descriptions of the patch 
method at these two locations, which appear to require updating the English 
documentation. cc @kayx23 
   https://apisix.apache.org/zh/docs/apisix/admin-api/#route-request-methods
   https://apisix.apache.org/docs/apisix/admin-api/#request-methods


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