moooofly / harborctl

A CLI tool for the Docker Registry Harbor. This project offer a command-line interface to the Harbor API, you can use it to manager your users, projects, repositories, etc. (This project aims to refactor harbor-go-client based on Harbor v1.6.0)
MIT License
28 stars 6 forks source link

[NOTE] The parameters of API "PUT /projects/{project_id}" alters dramatically. #1

Open moooofly opened 5 years ago

moooofly commented 5 years ago

related:


by swagger file for harbor API v1.6.0, the content body of "PUT /projects/{project_id}" is

{
  "project_name": "temp_10",
  "metadata": {
    "public": "true",
    "enable_content_trust": "true",
    "prevent_vul": "false",
    "severity": "low",
    "auto_scan": "true"
  }
}

by swagger file for harbor API v1.4.0, the content body of "PUT /projects/{project_id}" is

{
   "project_name": "temp_10",
   "metadata": {
      "public": 1,
      "enable_content_trust": false,
      "prevent_vulnerable_images_from_running": false,
      "prevent_vulnerable_images_from_running_severity": "",
      "automatically_scan_images_on_push": false
   }
}
{
   "project_name": "temp_10",
   "public": 1,
   "enable_content_trust": false,
   "prevent_vulnerable_images_from_running": false,
   "prevent_vulnerable_images_from_running_severity": "",
   "automatically_scan_images_on_push": false
}

CONCLUSION

moooofly commented 5 years ago

PS: one more thing to mention, the key of project_name is still not working as expect in API v1.6.0 (seems useless).