Repository navigation
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind documentation
Which issue(s) this PR fixes?
What this PR does?
The image handlers return
403when the caller is not authorized for therequested 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
403response to the image endpoints, mirroring the existinginline error response shape (
{code, msg, status}):GET /images/materialsGET /imagesGET /images.csvPOST /imagesPATCH /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/tasksnode-to-node report endpoint isintentionally left undocumented here — the spec documents no node-report
(
/tasks) routes, so adding one would set a new convention rather than filla documented gap. Can follow up separately if we decide those belong in the
public spec.
Test results (optional)
yqwas not available locally; the editeddocs.yamlparses cleanly with aYAML loader (103 paths, the 5 image endpoints each now carry a
403).A build-host
yq -o=json/task generateApiDocsrun is still the authoritative check.🤖 Generated with Claude Code