Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/openapi-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
gh workflow run regenerate_models.yaml \
gh workflow run manual_regenerate_models.yaml \
--repo apify/apify-client-python \
--field docs_pr_number="$PR_NUMBER" \
--field docs_workflow_run_id="${{ github.run_id }}"
Expand All @@ -169,7 +169,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
# Branch name convention must match what regenerate_models.yaml creates.
# Branch name convention must match what manual_regenerate_models.yaml creates.
run: |
BRANCH="update-models-docs-pr-${PR_NUMBER}"
EXISTING_PR=$(gh pr list \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ properties:
examples: [my-task]
options:
anyOf:
- $ref: ../common/OptionalRunOptions.yaml
- $ref: ../common/TaskOptions.yaml
- type: "null"
input:
anyOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ properties:
- type: "null"
options:
anyOf:
- $ref: ../common/OptionalRunOptions.yaml
- $ref: ../common/TaskOptions.yaml
- type: "null"
input:
anyOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ properties:
examples: [my-task]
options:
anyOf:
- $ref: ../common/OptionalRunOptions.yaml
- $ref: ../common/TaskOptions.yaml
- type: "null"
input:
anyOf:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: defaultRunOptions
title: DefaultRunOptions
type: object
properties:
build:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: CreateEnvironmentVariableResponse
title: EnvVarResponse
required:
- data
type: object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: exampleRunInput
title: ExampleRunInput
type: object
properties:
body:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: ActUpdate
title: UpdateActorRequest
type: object
properties:
name:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
title: ErrorDetail
type: object
properties:
type:
$ref: ErrorType.yaml
message:
type: string
description: Human-readable error message describing what went wrong.
27 changes: 21 additions & 6 deletions apify-api/openapi/components/schemas/common/ErrorResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,30 @@ required:
type: object
properties:
error:
title: ErrorDetail
type: object
required:
- type
- message
properties:
type:
title: ErrorType
type: string
examples: [run-failed]
description: Machine-processable error type identifier.
enum:
- actor-memory-limit-exceeded
- actor-not-found
- invalid-input
- method-not-allowed
- permission-denied
- rate-limit-exceeded
- record-not-found
- record-not-unique
- record-or-token-not-found
- request-id-invalid
- request-too-large
- run-failed
- run-timeout-exceeded
- token-not-valid
- unknown-build-tag
- unsupported-content-encoding
message:
type: string
examples:
- "Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)"
description: Human-readable error message describing what went wrong.
20 changes: 20 additions & 0 deletions apify-api/openapi/components/schemas/common/ErrorType.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title: ErrorType
type: string
description: Machine-processable error type identifier.
enum:
- actor-memory-limit-exceeded
- actor-not-found
- invalid-input
- method-not-allowed
- permission-denied
- rate-limit-exceeded
- record-not-found
- record-not-unique
- record-or-token-not-found
- request-id-invalid
- request-too-large
- run-failed
- run-timeout-exceeded
- token-not-valid
- unknown-build-tag
- unsupported-content-encoding
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: OptionalRunOptions
title: TaskOptions
type: object
properties:
build:
Expand Down
131 changes: 75 additions & 56 deletions apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,109 @@
ActorNotFoundErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: actor-not-found

RecordNotFoundErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: record-not-found

RecordOrTokenNotFoundErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: record-or-token-not-found

RunFailedErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: run-failed

RunTimeoutExceededErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: run-timeout-exceeded

ActorNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [actor-not-found]
message:
type: string
example: Actor was not found
$ref: "#/ActorNotFoundErrorDetail"
example:
error:
type: actor-not-found
message: Actor was not found

ActorBuildNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [record-not-found]
message:
type: string
example: Actor build was not found
$ref: "#/RecordNotFoundErrorDetail"
example:
error:
type: record-not-found
message: Actor build was not found

RecordOrTokenNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [record-or-token-not-found]
message:
type: string
example: Actor was not found or access denied
$ref: "#/RecordOrTokenNotFoundErrorDetail"
example:
error:
type: record-or-token-not-found
message: Actor was not found or access denied

ActorRunNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [record-not-found]
message:
type: string
example: Actor run was not found
$ref: "#/RecordNotFoundErrorDetail"
example:
error:
type: record-not-found
message: Actor run was not found

ActorRunTimeoutExceededError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [run-timeout-exceeded]
message:
type: string
example: Actor run exceeded the timeout of 300 seconds for this API endpoint
$ref: "#/RunTimeoutExceededErrorDetail"
example:
error:
type: run-timeout-exceeded
message: Actor run exceeded the timeout of 300 seconds for this API endpoint

ActorRunFailedError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [run-failed]
message:
type: string
example: "Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)"
$ref: "#/RunFailedErrorDetail"
example:
error:
type: run-failed
message: "Actor run did not succeed (run ID: 55uatRrZib4xbZs, status: FAILED)"

ActorVersionNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [record-not-found]
message:
type: string
example: Actor version was not found
$ref: "#/RecordNotFoundErrorDetail"
example:
error:
type: record-not-found
message: Actor version was not found
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
UnknownBuildTagErrorDetail:
allOf:
- $ref: ../ErrorDetail.yaml
- type: object
properties:
type:
const: unknown-build-tag

UnknownBuildTagError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [unknown-build-tag]
message:
type: string
example: 'Build with tag "latest" was not found. Has the Actor been built already?'
$ref: "#/UnknownBuildTagErrorDetail"
example:
error:
type: unknown-build-tag
message: Build with tag "latest" was not found. Has the Actor been built already?
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ EnvironmentVariableNotFoundError:
type: object
properties:
error:
type: object
properties:
type:
type: string
enum: [record-not-found]
message:
type: string
example: Environment variable was not found
$ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail"
example:
error:
type: record-not-found
message: Environment variable was not found
Loading