You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dolphinscheduler.apache.org by 马浚杰 <ma...@163.com> on 2021/07/10 02:04:42 UTC

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、Chinese-version
    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
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.

Re: First week report on Restful

Posted by wu shaoj <sh...@gmail.com>.
  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<ma...@dolphinscheduler.apache.org> , do you have any other concerns?


From: 马浚杰 <ma...@163.com>
Date: Saturday, July 10, 2021 at 10:05
To: dev@dolphinscheduler.apache.org <de...@dolphinscheduler.apache.org>
Cc: shaojwu@gmail.com <sh...@gmail.com>
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.