1.  Version controller.

I think there is no need to consider this feature. As our project develops 
deeply, we can consider it.

  1.  Patch method

Please follow the standard Restful. Personal preferences are the last important.




Hi, @dev<mailto:[email protected]> , do you have any other 
concerns?


From: 马浚杰 <[email protected]>
Date: Saturday, July 10, 2021 at 10:05
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: First week report on Restful
    In this week, I read some articles about restful, and then according to the 
requirements, I made the specification document (Draft) suitable for our 
project, and gave the Chinese and English versions in the link. 
Englih-version<http://note.youdao.com/noteshare?id=45ede2c817b600b74fd0066601d9eeab>、Chinese-version<http://note.youdao.com/noteshare?id=5383eb74f04ea5324ab0c7105e125e58>
    Now I have two problems, one is about API version management, the other is 
about the use of PATCH Method.
1. Version controller
    Does our project have such a requirement scenario: we need to modify the 
return data to change the interface logic, but at the same time, we need to 
ensure the compatibility with the old version, as shown in the figure below. If 
so, we need to introduce version number management. At the same time, we also 
need to communicate a set of specific solutions and implementation details See 
the link for details: https://segmentfault.com/a/1190000006165182
[cid:3ebd5e62$1$17a8e20cd87$Coremail$marin_man$163.com]
2. PATCH method
    PATCH is similar to PUT. PATCH is used to update part of the content of a 
resource. For example, only the phone number field of user information is 
updated. In addition, PATCH also means to create or save.
    Put is used to update the complete content of a resource. For example, a 
user needs to fill in a complete form to update all information.
     In our project, I learned that our parameter passing is usually local. 
Therefore, should we change the request mode type from PUT to PATCH. This may 
cause some people's antipathy.

     Next, I will continue to follow up the design of restful documents, and 
initially improve all interfaces of the project.





Reply via email to