diff --git a/.github/workflows/openapi-ci.yaml b/.github/workflows/openapi-ci.yaml index 9f7a2b5b66..5c79e5671b 100644 --- a/.github/workflows/openapi-ci.yaml +++ b/.github/workflows/openapi-ci.yaml @@ -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 }}" @@ -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 \ diff --git a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml index 715f3bc970..433c44f0fa 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml @@ -12,7 +12,7 @@ properties: examples: [my-task] options: anyOf: - - $ref: ../common/OptionalRunOptions.yaml + - $ref: ../common/TaskOptions.yaml - type: "null" input: anyOf: diff --git a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml index 783829f1a7..eff273d7e9 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml @@ -40,7 +40,7 @@ properties: - type: "null" options: anyOf: - - $ref: ../common/OptionalRunOptions.yaml + - $ref: ../common/TaskOptions.yaml - type: "null" input: anyOf: diff --git a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml index 0a3d2ed903..d12c85c191 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml @@ -6,7 +6,7 @@ properties: examples: [my-task] options: anyOf: - - $ref: ../common/OptionalRunOptions.yaml + - $ref: ../common/TaskOptions.yaml - type: "null" input: anyOf: diff --git a/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml b/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml index de368b6ff6..74a94d1461 100644 --- a/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml +++ b/apify-api/openapi/components/schemas/actors/DefaultRunOptions.yaml @@ -1,4 +1,4 @@ -title: defaultRunOptions +title: DefaultRunOptions type: object properties: build: diff --git a/apify-api/openapi/components/schemas/actors/EnvVarResponse.yaml b/apify-api/openapi/components/schemas/actors/EnvVarResponse.yaml index ce0ff24a4e..e07f5a2358 100644 --- a/apify-api/openapi/components/schemas/actors/EnvVarResponse.yaml +++ b/apify-api/openapi/components/schemas/actors/EnvVarResponse.yaml @@ -1,4 +1,4 @@ -title: CreateEnvironmentVariableResponse +title: EnvVarResponse required: - data type: object diff --git a/apify-api/openapi/components/schemas/actors/ExampleRunInput.yaml b/apify-api/openapi/components/schemas/actors/ExampleRunInput.yaml index ccc22d96d4..36d77dcd33 100644 --- a/apify-api/openapi/components/schemas/actors/ExampleRunInput.yaml +++ b/apify-api/openapi/components/schemas/actors/ExampleRunInput.yaml @@ -1,4 +1,4 @@ -title: exampleRunInput +title: ExampleRunInput type: object properties: body: diff --git a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml index 83d5c42197..fe7ef33ff6 100644 --- a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml @@ -1,4 +1,4 @@ -title: ActUpdate +title: UpdateActorRequest type: object properties: name: diff --git a/apify-api/openapi/components/schemas/common/ErrorDetail.yaml b/apify-api/openapi/components/schemas/common/ErrorDetail.yaml new file mode 100644 index 0000000000..ab861b5cd0 --- /dev/null +++ b/apify-api/openapi/components/schemas/common/ErrorDetail.yaml @@ -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. diff --git a/apify-api/openapi/components/schemas/common/ErrorResponse.yaml b/apify-api/openapi/components/schemas/common/ErrorResponse.yaml index a0bb79f713..6fffb378f0 100644 --- a/apify-api/openapi/components/schemas/common/ErrorResponse.yaml +++ b/apify-api/openapi/components/schemas/common/ErrorResponse.yaml @@ -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. diff --git a/apify-api/openapi/components/schemas/common/ErrorType.yaml b/apify-api/openapi/components/schemas/common/ErrorType.yaml new file mode 100644 index 0000000000..3095d7c0f2 --- /dev/null +++ b/apify-api/openapi/components/schemas/common/ErrorType.yaml @@ -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 diff --git a/apify-api/openapi/components/schemas/common/OptionalRunOptions.yaml b/apify-api/openapi/components/schemas/common/TaskOptions.yaml similarity index 93% rename from apify-api/openapi/components/schemas/common/OptionalRunOptions.yaml rename to apify-api/openapi/components/schemas/common/TaskOptions.yaml index 2e71144bc9..2168fa4731 100644 --- a/apify-api/openapi/components/schemas/common/OptionalRunOptions.yaml +++ b/apify-api/openapi/components/schemas/common/TaskOptions.yaml @@ -1,4 +1,4 @@ -title: OptionalRunOptions +title: TaskOptions type: object properties: build: diff --git a/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml b/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml index 9034a50075..8c5b227e93 100644 --- a/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml @@ -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 diff --git a/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml b/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml index a5e56c7e2b..b7ee2a51ed 100644 --- a/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml @@ -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? diff --git a/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml b/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml index 4f4d75e498..ad855e72ee 100644 --- a/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml @@ -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 diff --git a/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml b/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml index 9221a7afe8..6155bb62c4 100644 --- a/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml @@ -1,77 +1,67 @@ +RequestIdInvalidErrorDetail: + allOf: + - $ref: ../ErrorDetail.yaml + - type: object + properties: + type: + const: request-id-invalid + DatasetNotFoundError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [record-not-found] - message: - type: string - example: Dataset was not found + $ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail" + example: + error: + type: record-not-found + message: Dataset was not found KeyValueStoreNotFoundError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [record-not-found] - message: - type: string - example: Key-value Store was not found + $ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail" + example: + error: + type: record-not-found + message: Key-value Store was not found RequestQueueNotFoundError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [record-not-found] - message: - type: string - example: Request Queue was not found + $ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail" + example: + error: + type: record-not-found + message: Request Queue was not found RecordNotFoundError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [record-not-found] - message: - type: string - example: Record was not found + $ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail" + example: + error: + type: record-not-found + message: Record was not found RequestNotFoundError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [record-not-found] - message: - type: string - example: Request was not found + $ref: "./ActorErrors.yaml#/RecordNotFoundErrorDetail" + example: + error: + type: record-not-found + message: Request was not found RequestIdInvalidError: type: object properties: error: - type: object - properties: - type: - type: string - enum: [request-id-invalid] - message: - type: string - example: Request ID does not correspond to uniqueKey + $ref: "#/RequestIdInvalidErrorDetail" + example: + error: + type: request-id-invalid + message: Request ID does not correspond to uniqueKey diff --git a/apify-api/openapi/components/schemas/request-queues/DeletedRequest.yaml b/apify-api/openapi/components/schemas/request-queues/DeletedRequest.yaml index df83c8d9c7..c5167529db 100644 --- a/apify-api/openapi/components/schemas/request-queues/DeletedRequest.yaml +++ b/apify-api/openapi/components/schemas/request-queues/DeletedRequest.yaml @@ -1,11 +1,5 @@ title: DeletedRequest description: Confirmation of a request that was successfully deleted from a request queue. -type: object anyOf: - - required: [id] - - required: [uniqueKey] -properties: - uniqueKey: - $ref: ./SharedProperties.yaml#/UniqueKey - id: - $ref: ./SharedProperties.yaml#/RequestId + - $ref: ./DeletedRequestById.yaml + - $ref: ./DeletedRequestByUniqueKey.yaml diff --git a/apify-api/openapi/components/schemas/request-queues/DeletedRequestById.yaml b/apify-api/openapi/components/schemas/request-queues/DeletedRequestById.yaml new file mode 100644 index 0000000000..2d520e7fa6 --- /dev/null +++ b/apify-api/openapi/components/schemas/request-queues/DeletedRequestById.yaml @@ -0,0 +1,9 @@ +title: DeletedRequestById +description: Confirmation of a request that was successfully deleted, identified by its ID. +type: object +required: [id] +properties: + uniqueKey: + $ref: ./SharedProperties.yaml#/UniqueKey + id: + $ref: ./SharedProperties.yaml#/RequestId diff --git a/apify-api/openapi/components/schemas/request-queues/DeletedRequestByUniqueKey.yaml b/apify-api/openapi/components/schemas/request-queues/DeletedRequestByUniqueKey.yaml new file mode 100644 index 0000000000..e3b7ad4665 --- /dev/null +++ b/apify-api/openapi/components/schemas/request-queues/DeletedRequestByUniqueKey.yaml @@ -0,0 +1,9 @@ +title: DeletedRequestByUniqueKey +description: Confirmation of a request that was successfully deleted, identified by its unique key. +type: object +required: [uniqueKey] +properties: + uniqueKey: + $ref: ./SharedProperties.yaml#/UniqueKey + id: + $ref: ./SharedProperties.yaml#/RequestId diff --git a/apify-api/openapi/components/schemas/request-queues/RequestDraftDelete.yaml b/apify-api/openapi/components/schemas/request-queues/RequestDraftDelete.yaml index 6ae37fa914..c862f61c06 100644 --- a/apify-api/openapi/components/schemas/request-queues/RequestDraftDelete.yaml +++ b/apify-api/openapi/components/schemas/request-queues/RequestDraftDelete.yaml @@ -1,11 +1,5 @@ title: RequestDraftDelete description: A request that should be deleted. -type: object anyOf: - - required: [id] - - required: [uniqueKey] -properties: - id: - $ref: ./SharedProperties.yaml#/RequestId - uniqueKey: - $ref: ./SharedProperties.yaml#/UniqueKey + - $ref: ./RequestDraftDeleteById.yaml + - $ref: ./RequestDraftDeleteByUniqueKey.yaml diff --git a/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteById.yaml b/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteById.yaml new file mode 100644 index 0000000000..1aad7fc388 --- /dev/null +++ b/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteById.yaml @@ -0,0 +1,9 @@ +title: RequestDraftDeleteById +description: A request that should be deleted, identified by its ID. +type: object +required: [id] +properties: + id: + $ref: ./SharedProperties.yaml#/RequestId + uniqueKey: + $ref: ./SharedProperties.yaml#/UniqueKey diff --git a/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteByUniqueKey.yaml b/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteByUniqueKey.yaml new file mode 100644 index 0000000000..cfb58846b7 --- /dev/null +++ b/apify-api/openapi/components/schemas/request-queues/RequestDraftDeleteByUniqueKey.yaml @@ -0,0 +1,9 @@ +title: RequestDraftDeleteByUniqueKey +description: A request that should be deleted, identified by its unique key. +type: object +required: [uniqueKey] +properties: + id: + $ref: ./SharedProperties.yaml#/RequestId + uniqueKey: + $ref: ./SharedProperties.yaml#/UniqueKey diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleAction.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleAction.yaml index affe9ded11..77c1495ee9 100644 --- a/apify-api/openapi/components/schemas/schedules/ScheduleAction.yaml +++ b/apify-api/openapi/components/schemas/schedules/ScheduleAction.yaml @@ -1,48 +1,9 @@ title: ScheduleAction oneOf: - - title: ScheduleActionRunActor - required: - - id - - type - - actorId - type: object - properties: - id: - type: string - examples: [c6KfSgoQzFhMk3etc] - type: - type: string - enum: [RUN_ACTOR] - actorId: - type: string - examples: [jF8GGEvbEg4Au3NLA] - runInput: - anyOf: - - $ref: ./ScheduleActionRunInput.yaml - - type: "null" - runOptions: - anyOf: - - $ref: ../common/OptionalRunOptions.yaml - - type: "null" - - title: ScheduleActionRunActorTask - required: - - id - - type - - actorTaskId - type: object - properties: - id: - type: string - examples: [c6KfSgoQzFhMk3etc] - type: - type: string - enum: [RUN_ACTOR_TASK] - actorTaskId: - type: string - examples: [jF8GGEvbEg4Au3NLA] - input: - anyOf: - - type: object - - type: "null" + - $ref: ./ScheduleActionRunActor.yaml + - $ref: ./ScheduleActionRunActorTask.yaml discriminator: propertyName: type + mapping: + RUN_ACTOR: ./ScheduleActionRunActor.yaml + RUN_ACTOR_TASK: ./ScheduleActionRunActorTask.yaml diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActor.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActor.yaml new file mode 100644 index 0000000000..66b247918d --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActor.yaml @@ -0,0 +1,23 @@ +title: ScheduleActionRunActor +required: + - id + - type + - actorId +type: object +properties: + id: + type: string + examples: [c6KfSgoQzFhMk3etc] + type: + const: RUN_ACTOR + actorId: + type: string + examples: [jF8GGEvbEg4Au3NLA] + runInput: + anyOf: + - $ref: ./ScheduleActionRunInput.yaml + - type: "null" + runOptions: + anyOf: + - $ref: ../common/TaskOptions.yaml + - type: "null" diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActorTask.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActorTask.yaml new file mode 100644 index 0000000000..e731587a72 --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunActorTask.yaml @@ -0,0 +1,19 @@ +title: ScheduleActionRunActorTask +required: + - id + - type + - actorTaskId +type: object +properties: + id: + type: string + examples: [c6KfSgoQzFhMk3etc] + type: + const: RUN_ACTOR_TASK + actorTaskId: + type: string + examples: [jF8GGEvbEg4Au3NLA] + input: + anyOf: + - type: object + - type: "null" diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionRunInput.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunInput.yaml index b73679f719..395008fb24 100644 --- a/apify-api/openapi/components/schemas/schedules/ScheduleActionRunInput.yaml +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionRunInput.yaml @@ -1,4 +1,4 @@ -title: ScheduleActionsRunInput +title: ScheduleActionRunInput type: object properties: body: diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionShort.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionShort.yaml index 311e9c0c14..a3b47cfd9b 100644 --- a/apify-api/openapi/components/schemas/schedules/ScheduleActionShort.yaml +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionShort.yaml @@ -1,36 +1,9 @@ title: ScheduleActionShort oneOf: - - title: ScheduleActionShortRunActor - required: - - id - - type - - actorId - type: object - properties: - id: - type: string - examples: [ZReCs7hkdieq8ZUki] - type: - type: string - enum: [RUN_ACTOR] - actorId: - type: string - examples: [HKhKmiCMrDgu9eXeE] - - title: ScheduleActionShortRunActorTask - required: - - id - - type - - actorTaskId - type: object - properties: - id: - type: string - examples: [ZReCs7hkdieq8ZUki] - type: - type: string - enum: [RUN_ACTOR_TASK] - actorTaskId: - type: string - examples: [HKhKmiCMrDgu9eXeE] + - $ref: ./ScheduleActionShortRunActor.yaml + - $ref: ./ScheduleActionShortRunActorTask.yaml discriminator: propertyName: type + mapping: + RUN_ACTOR: ./ScheduleActionShortRunActor.yaml + RUN_ACTOR_TASK: ./ScheduleActionShortRunActorTask.yaml diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActor.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActor.yaml new file mode 100644 index 0000000000..6ca300f802 --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActor.yaml @@ -0,0 +1,15 @@ +title: ScheduleActionShortRunActor +required: + - id + - type + - actorId +type: object +properties: + id: + type: string + examples: [ZReCs7hkdieq8ZUki] + type: + const: RUN_ACTOR + actorId: + type: string + examples: [HKhKmiCMrDgu9eXeE] diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActorTask.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActorTask.yaml new file mode 100644 index 0000000000..15a75eec4b --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleActionShortRunActorTask.yaml @@ -0,0 +1,15 @@ +title: ScheduleActionShortRunActorTask +required: + - id + - type + - actorTaskId +type: object +properties: + id: + type: string + examples: [ZReCs7hkdieq8ZUki] + type: + const: RUN_ACTOR_TASK + actorTaskId: + type: string + examples: [HKhKmiCMrDgu9eXeE] diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleCreateAction.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleCreateAction.yaml index 4da9d148b4..40b17be090 100644 --- a/apify-api/openapi/components/schemas/schedules/ScheduleCreateAction.yaml +++ b/apify-api/openapi/components/schemas/schedules/ScheduleCreateAction.yaml @@ -1,40 +1,9 @@ title: ScheduleCreateAction oneOf: - - title: ScheduleCreateActionRunActor - required: - - type - - actorId - type: object - properties: - type: - type: string - enum: [RUN_ACTOR] - actorId: - type: string - examples: [jF8GGEvbEg4Au3NLA] - runInput: - anyOf: - - $ref: ./ScheduleActionRunInput.yaml - - type: "null" - runOptions: - anyOf: - - $ref: ../common/OptionalRunOptions.yaml - - type: "null" - - title: ScheduleCreateActionRunActorTask - required: - - type - - actorTaskId - type: object - properties: - type: - type: string - enum: [RUN_ACTOR_TASK] - actorTaskId: - type: string - examples: [jF8GGEvbEg4Au3NLA] - input: - anyOf: - - type: object - - type: "null" + - $ref: ./ScheduleCreateActionRunActor.yaml + - $ref: ./ScheduleCreateActionRunActorTask.yaml discriminator: propertyName: type + mapping: + RUN_ACTOR: ./ScheduleCreateActionRunActor.yaml + RUN_ACTOR_TASK: ./ScheduleCreateActionRunActorTask.yaml diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActor.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActor.yaml new file mode 100644 index 0000000000..2af1152515 --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActor.yaml @@ -0,0 +1,19 @@ +title: ScheduleCreateActionRunActor +required: + - type + - actorId +type: object +properties: + type: + const: RUN_ACTOR + actorId: + type: string + examples: [jF8GGEvbEg4Au3NLA] + runInput: + anyOf: + - $ref: ./ScheduleActionRunInput.yaml + - type: "null" + runOptions: + anyOf: + - $ref: ../common/TaskOptions.yaml + - type: "null" diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActorTask.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActorTask.yaml new file mode 100644 index 0000000000..a63857ec27 --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleCreateActionRunActorTask.yaml @@ -0,0 +1,15 @@ +title: ScheduleCreateActionRunActorTask +required: + - type + - actorTaskId +type: object +properties: + type: + const: RUN_ACTOR_TASK + actorTaskId: + type: string + examples: [jF8GGEvbEg4Au3NLA] + input: + anyOf: + - type: object + - type: "null" diff --git a/apify-api/openapi/components/schemas/store/CurrentPricingInfo.yaml b/apify-api/openapi/components/schemas/store/CurrentPricingInfo.yaml index 3fd172c113..df6b72be74 100644 --- a/apify-api/openapi/components/schemas/store/CurrentPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/store/CurrentPricingInfo.yaml @@ -1,4 +1,4 @@ -title: currentPricingInfo +title: CurrentPricingInfo required: - pricingModel type: object diff --git a/apify-api/openapi/components/schemas/tools/DecodeAndVerifyData.yaml b/apify-api/openapi/components/schemas/tools/DecodeAndVerifyData.yaml new file mode 100644 index 0000000000..b2851285e9 --- /dev/null +++ b/apify-api/openapi/components/schemas/tools/DecodeAndVerifyData.yaml @@ -0,0 +1,15 @@ +title: DecodeAndVerifyData +type: object +required: + - decoded + - encodedByUserId + - isVerifiedUser +properties: + decoded: + description: The original object that was encoded. + encodedByUserId: + type: [string, "null"] + examples: [wRwJZtadYvn4mBZmm] + isVerifiedUser: + type: boolean + examples: [false] diff --git a/apify-api/openapi/components/schemas/tools/DecodeAndVerifyResponse.yaml b/apify-api/openapi/components/schemas/tools/DecodeAndVerifyResponse.yaml index 8ab7997818..ab7657f29e 100644 --- a/apify-api/openapi/components/schemas/tools/DecodeAndVerifyResponse.yaml +++ b/apify-api/openapi/components/schemas/tools/DecodeAndVerifyResponse.yaml @@ -4,17 +4,4 @@ required: - data properties: data: - type: object - required: - - decoded - - encodedByUserId - - isVerifiedUser - properties: - decoded: - description: The original object that was encoded. - encodedByUserId: - type: [string, "null"] - examples: [wRwJZtadYvn4mBZmm] - isVerifiedUser: - type: boolean - examples: [false] + $ref: ./DecodeAndVerifyData.yaml diff --git a/apify-api/openapi/components/schemas/tools/EncodeAndSignData.yaml b/apify-api/openapi/components/schemas/tools/EncodeAndSignData.yaml new file mode 100644 index 0000000000..a0f51f6e0c --- /dev/null +++ b/apify-api/openapi/components/schemas/tools/EncodeAndSignData.yaml @@ -0,0 +1,8 @@ +title: EncodeAndSignData +type: object +required: + - encoded +properties: + encoded: + type: string + examples: [eyJwYXlsb2FkIjoiLi4uIiwic2lnbmF0dXJlIjoiLi4uIn0=] diff --git a/apify-api/openapi/components/schemas/tools/EncodeAndSignResponse.yaml b/apify-api/openapi/components/schemas/tools/EncodeAndSignResponse.yaml index 9ba985f883..92d1cacb3e 100644 --- a/apify-api/openapi/components/schemas/tools/EncodeAndSignResponse.yaml +++ b/apify-api/openapi/components/schemas/tools/EncodeAndSignResponse.yaml @@ -4,10 +4,4 @@ required: - data properties: data: - type: object - required: - - encoded - properties: - encoded: - type: string - examples: [eyJwYXlsb2FkIjoiLi4uIiwic2lnbmF0dXJlIjoiLi4uIn0=] + $ref: ./EncodeAndSignData.yaml