Skip to content

fix: add missing response codes and fix schema issues in actor-builds endpoints#2287

Draft
Pijukatel wants to merge 2 commits intomasterfrom
fix/openapi/actor-builds
Draft

fix: add missing response codes and fix schema issues in actor-builds endpoints#2287
Pijukatel wants to merge 2 commits intomasterfrom
fix/openapi/actor-builds

Conversation

@Pijukatel
Copy link
Contributor

@Pijukatel Pijukatel commented Feb 26, 2026

Summary

Fixes OpenAPI specification validation errors detected at runtime for the /v2/actor-builds endpoints.

Validation errors being fixed

These are the exact lines from the error log:

WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}","errors":[{"message":"no schema defined for status code '204' in the openapi spec","path":"/v2/actor-builds/{id}"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}","errors":[{"message":"no schema defined for status code '404' in the openapi spec","path":"/v2/actor-builds/{id}"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}/abort","errors":[{"message":"no schema defined for status code '403' in the openapi spec","path":"/v2/actor-builds/{id}/abort"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}/abort","errors":[{"message":"no schema defined for status code '401' in the openapi spec","path":"/v2/actor-builds/{id}/abort"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}","errors":[{"message":"no schema defined for status code '401' in the openapi spec","path":"/v2/actor-builds/{id}"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}","errors":[{"message":"no schema defined for status code '403' in the openapi spec","path":"/v2/actor-builds/{id}"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}/abort","errors":[{"message":"must be string,null","errorCode":"type.openapi.validation","path":"/response/data/finishedAt"}]}
WARN  Request OpenAPI validation error {"url":"/v2/actor-builds/{id}/log","errors":[{"message":"must have required property 'stream'","errorCode":"required.openapi.validation","path":"/query/stream"}]}
WARN  Request OpenAPI validation error {"url":"/v2/actor-builds/{id}/log","errors":[{"message":"must have required property 'stream'","errorCode":"required.openapi.validation","path":"/query/stream"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/{id}/log","errors":[{"message":"no schema defined for status code '404' in the openapi spec","path":"/v2/actor-builds/{id}/log"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds/unexisting-build-id/openapi.json","errors":[{"message":"no schema defined for status code '404' in the openapi spec","path":"/v2/actor-builds/unexisting-build-id/openapi.json"}]}
WARN  Response OpenAPI validation error {"url":"/v2/actor-builds","errors":[{"message":"no schema defined for status code '403' in the openapi spec","path":"/v2/actor-builds"}]}

Changes

New file: components/responses/Forbidden.yaml

Added a shared 403 Forbidden response component, following the same pattern as the existing Unauthorized.yaml and NotFound.yaml components. Reused across all endpoints in this PR that can return 403.

paths/actor-builds/actor-builds.yaml - GET /v2/actor-builds

  • Added 403 response - returned when the caller lacks permission to list builds.

paths/actor-builds/actor-builds@{buildId}.yaml - GET and DELETE /v2/actor-builds/{buildId}

  • GET: Added 401 response - returned when no valid token is provided.
  • GET: Added 404 response - returned when the build ID does not exist.
  • DELETE: Added 404 response - returned when the build ID does not exist.

paths/actor-builds/actor-builds@{buildId}@abort.yaml - POST /v2/actor-builds/{buildId}/abort

  • Added 401 response - returned when no valid token is provided.
  • Added 403 response - returned when the caller does not own the build.

paths/actor-builds/actor-builds@{buildId}@log.yaml - GET /v2/actor-builds/{buildId}/log

  • Changed stream query parameter from required: true to required: false - it is an optional modifier, not required on every request.
  • Changed download query parameter from required: true to required: false - same reason.
  • Added 404 response - returned when the build ID does not exist.

paths/actor-builds/actor-builds@{buildId}@openapi.json.yaml - GET /v2/actor-builds/{buildId}/openapi.json

  • Added 404 response - returned when the build ID does not exist.

Issues

Partially implements: #2286

🤖 Generated with Claude Code

@github-actions github-actions bot added this to the 135th sprint - Tooling team milestone Feb 26, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 26, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit b44c9d3 and is ready at https://pr-2287.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit dd5b7749 and is ready at https://pr-2287.preview.docs.apify.com!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants