Rust implementation of OCI Distribution Spec with granular access control

Add OCI distribution endpoints to OpenAPI/Swagger docs #4

open opened by pierrelf.com

Problem#

The Swagger UI at /swagger-ui only documents the admin API endpoints (/admin/users CRUD and permissions). All OCI Distribution Spec endpoints are missing from the OpenAPI documentation:

  • GET /v2/ - Auth check
  • HEAD/GET /v2/{org}/{repo}/manifests/{reference} - Manifest operations
  • HEAD/GET /v2/{org}/{repo}/blobs/{digest} - Blob operations
  • POST /v2/{org}/{repo}/blobs/uploads/ - Initiate upload
  • PATCH/PUT /v2/{org}/{repo}/blobs/uploads/{reference} - Upload chunks
  • PUT /v2/{org}/{repo}/manifests/{reference} - Push manifest
  • DELETE /v2/{org}/{repo}/manifests/{reference} - Delete manifest
  • DELETE /v2/{org}/{repo}/blobs/{digest} - Delete blob
  • GET /v2/{org}/{repo}/tags/list - List tags

Proposed Solution#

Add utoipa annotations to all OCI endpoint handlers in blobs.rs, manifests.rs, tags.rs, and auth.rs, and include them in the OpenAPI doc generation in openapi.rs.

This would make the API self-documenting and allow users to explore and test endpoints via Swagger UI.

sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mfkg6veqel2e