Skip to content

docs(images): document the 403 responses on the image endpoints - #124

Open
SekiXu wants to merge 1 commit into
developfrom
docs/images-403-responses
Open

SekiXu wants to merge 1 commit into
developfrom
docs/images-403-responses

Conversation

@SekiXu

@SekiXu SekiXu commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

What type of PR is this?

/kind documentation

Which issue(s) this PR fixes?

What this PR does?

The image handlers return 403 when the caller is not authorized for the
requested project, but the OpenAPI spec did not list that response for any
image endpoint, so the published spec disagreed with the service.

This adds the 403 response to the image endpoints, mirroring the existing
inline error response shape ({code, msg, status}):

  • GET /images/materials
  • GET /images
  • GET /images.csv
  • POST /images
  • PATCH /images/{imageId}

No paths, request bodies, or existing responses are changed. The example
messages are taken from the actual denial strings the handlers emit.

Note: the internal PATCH /images/tasks node-to-node report endpoint is
intentionally left undocumented here — the spec documents no node-report
(/tasks) routes, so adding one would set a new convention rather than fill
a documented gap. Can follow up separately if we decide those belong in the
public spec.

Test results (optional)

yq was not available locally; the edited docs.yaml parses cleanly with a
YAML loader (103 paths, the 5 image endpoints each now carry a 403).
A build-host yq -o=json / task generateApiDocs run is still the authoritative check.

🤖 Generated with Claude Code

The image handlers reject a caller that is not authorized for the
requested project with 403, but the OpenAPI spec did not list that
response for any image endpoint, so the published spec disagreed with
the service.

Add the 403 response to the image materials, list, CSV, import, and
update endpoints, mirroring the existing inline error response shape
({code, msg, status}).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Seki Xu <seki.xu@bigstack.co>
@SekiXu
SekiXu requested review from a team as code owners October 20, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant