mappjzc opened a new pull request, #3857:
URL: https://github.com/apache/incubator-devlake/pull/3857

   ### Summary
   To maintain the consistency of the interface, after communicating with the 
front end, it is now decided to adjust the case of the relevant parameters of 
the project interface, adjust the return value when an error occurs in some 
interfaces, and fix a problem that causes HTTP to lose necessary error details.
   
   projects_post.sh
   ```bash
   #!/bin/sh
   curl --location --request POST 'devlake:8080/projects' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "name":"TestProject",
       "description":"this is one of test project"
   }'
   
   echo "\r\n"
   ```
   
   projects_patch.sh
   ``` bash
   #!/bin/sh
   curl --location --request PATCH 'devlake:8080/projects/TestProject' \
   --header 'Content-Type: application/json' \
   --data-raw '{
       "name":"TestProject",
       "description":"this is one of test project witch been patch",
       "enable": false,
       "metrics": [
           {
               "pluginName": "dora",
               "pluginOption": "{}",
               "enable": true
           }
       ]
   }'
   
   echo "\r\n"
   ```
   
   projects_get.sh
   ```bash
   #!/bin/sh
   curl --location --request GET 'devlake:8080/projects' \
   --header 'Content-Type: application/json' \
   --data-raw '{
   }'
   
   echo "\r\n"
   ```
   
   projects_get_one.sh
   ```bash
   #!/bin/sh
   curl --location --request GET 'devlake:8080/projects/TestProject' \
   --header 'Content-Type: application/json' \
   --data-raw '{
   }'
   
   echo "\r\n"
   ```
   
   ### Does this close any open issues?
   Closes #3854 
   Relate #3468 
   
   ### Screenshots
   
![image](https://user-images.githubusercontent.com/2921251/205623624-b45712e1-e7d9-424b-bc51-15494a4b30a7.png)
   
![image](https://user-images.githubusercontent.com/2921251/205623901-80ffc8f7-0b32-44ee-9040-9ed526065365.png)
   
![image](https://user-images.githubusercontent.com/2921251/205624278-7ea507ab-d730-4116-816a-994138514a42.png)
   
![image](https://user-images.githubusercontent.com/2921251/205624360-4c07c1a5-4bcd-4f57-b39d-bdfade613efe.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