1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-24 21:59:32 +03:00
Files
harbor/api/v2.0
Patrick Eschenbach abc41cc9eb Fix/api completeness (#23476)
* docs(api): fix 15 swagger gaps — descriptions, responses, lint rules

- Add missing description/summary to deleteProjectMember,
  UpdateImmuRule, DeleteImmuRule, listUsers, getCurrentUserInfo,
  getUser, updateUserProfile, setUserSysAdmin,
  getCurrentUserPermissions, listSchedules, getSchedulePaused
- Add accurate error responses traced to handler code:
  404 on member/immutable ops (RequireProjectAccess paths),
  403+500 on listAuditLogEventTypes (RequireSystemAccess),
  412 on getCurrentUserInfo (non-local security context),
  400 on listSchedules/getSchedulePaused/updateUserProfile,
  401+500 on getRentenitionMetadata (Prepare middleware),
  500 on pingOIDC
- Remove inaccurate responses: 404 from getSchedulePaused/
  listSchedules/updateUserProfile; 403 from getSchedulePaused;
  500 from getCurrentUserPermissions (in-memory only)
- Fix inline 500/401 descriptions in setUserSysAdmin and
  getCurrentUserPermissions to use shared  definitions
- Add operation-description and operation-summary-required rules
  to .spectral.yaml to prevent regression

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* chore: complete swagger changes for harbor-cli well known issues

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* docs(api): restore response codes removed in error from schedules and user endpoints

- Restore 404 on listSchedules (GET /schedules)
- Restore 403 and 404 on getSchedulePaused (GET /schedules/{job_type}/paused)
- Restore 404 on updateUserProfile (PUT /users/{id})
- Restore 500 on getCurrentUserPermissions (GET /users/current/permissions)

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* fix: clean up binaries

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* fix: add needed statements for spectral linting and api tests

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* fix: add changes for unsupported entity; more clear description

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>

* fix: add changes for unsupported entity; more clear description

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>

* fix: add changes for unsupported entity; more clear description

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>

---------

Signed-off-by: Patrick Eschenbach <patrickeschenbach96@gmail.com>
Signed-off-by: Patrick Eschenbach <45457307+qcserestipy@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-02 23:42:39 +00:00
..
2023-02-24 14:47:42 +08:00
2026-07-02 23:42:39 +00:00

References

This file lists all the files that are referring the swagger yaml file.

  • Makefile
    • java -jar swagger-codegen-cli.jar generate -i api/harbor/swagger.yaml -l python -o harborclient
  • README
    • Harbor RESTful API in API section
  • docs/configure_swagger.md
    • https://raw.githubusercontent.com/goharbor/harbor/master/api/harbor/swagger.yaml
  • make/photon/portal/Dockerfile
    • COPY ./api/v2.0/swagger.yaml /build_dir/swagger.yaml
  • tests/swaggerchecker.sh
    • HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT/api/harbor/swagger.yaml"
    • else HARBOR_SWAGGER_FILE="https://raw.githubusercontent.com/$TRAVIS_PULL_REQUEST_SLUG/$TRAVIS_PULL_REQUEST_SHA/api/harbor/swagger.yaml"

Notes: Base path is the code repository root dir.