liuxiran commented on issue #2105:
URL: 
https://github.com/apache/apisix-dashboard/issues/2105#issuecomment-911191098


   Hi all, in order to make it more clear about what are the changes between 
the new design and the current manager-api  admin-api, I made more detailed 
comparison:
   
   ###  method and url
   
   
![image](https://user-images.githubusercontent.com/2561857/131726515-58e593f4-37f9-4597-9fb7-51fd112eab5e.png)
       this is the comparison of current Manager-API and Admin-API, we can see 
that the method and url are almost the same, only one exception, Manager-API 
has a API to check is the route name is exist, actually this is only a logic in 
UI, and in our APISIX only route id is the unique Identification, we allow 
repeated names, so it would be better to remove this API and the Validation 
rules.
   
    the new design of route API is:
   
![image](https://user-images.githubusercontent.com/2561857/131728342-a3b5b0db-eead-48b4-a8f8-3527eeeaeff9.png)
   
   differences are:
   
   * keep the manager-api and admin-api the same
   * remove `PUT  /apisix/admin/routes/{id}`, the reason comment here: 
https://github.com/apache/apisix-dashboard/issues/2105#issuecomment-909758567
   * change `PATCH  /apisix/admin/routes/{id}/{path}` to `PUT  
/apisix/admin/routes/{id}/{path}`, the reason: when user use this API they can 
easier update the whole specified path in the route, refer to 
https://en.wikipedia.org/wiki/Patch_verb, `PUT` method is more suitable.
   
   ###  request parameters for create a route
   
   here is the  comparison of the new design and the current 
Admin-API(Manager-API should the same parameters with Admin-API)
   
![image](https://user-images.githubusercontent.com/2561857/131781513-82405f80-9a0d-469d-bfc2-1b68cc57913e.png)
   
   differences are:
   
   * only keep `uris`, remove `uri`, since `uris` contains `uri`, there is no 
need to keep two of them to Increase the difficulty of choice for users
   * only keep `hosts`, remove `host`, same reason with before
   * only keep `remote_addrs`, remove `remote_addr`, same reason with before
   
   ### Uniform response parameter format
   
   actually the response parameters struct is different between the Admin-API 
and Manager-API, here is the comparison,
   
![image](https://user-images.githubusercontent.com/2561857/131784034-fc518b3e-6359-40cb-bd3a-dfe826442553.png)
   
![image](https://user-images.githubusercontent.com/2561857/131784836-883fc828-8fe8-4ed2-9124-f08a6758698f.png)
   
![image](https://user-images.githubusercontent.com/2561857/131785336-02f978e7-40db-4069-9aea-ea9b941a77db.png)
   
   
   and here is the new design as we talked about in the mail list
   
   
![image](https://user-images.githubusercontent.com/2561857/131785684-c2b35e64-a8df-442a-bda0-696e8a88f152.png)
   
   


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