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
17 changes: 17 additions & 0 deletions spec/api_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ components:
type: string
enum:
- SUCCESS
- ACCEPTED
description: Indicates whether the response was successful or what error has occurred.

EmptyResponse:
Expand All @@ -69,6 +70,22 @@ components:
type: object
type: object

NotEmptyResponse:
type: object
required:
- response
properties:
response:
allOf:
- $ref: '#/components/schemas/SuccessResponse'
- properties:
data:
properties:
message:
type: string
type: object
type: object

Error:
type: object
properties:
Expand Down
63 changes: 31 additions & 32 deletions spec/job_batches_v1/job_batches_endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: job.not.found
message: >-
Job {translationJobUid} not found for project {projectId}.
- key: job.not.found
message: >-
Job {translationJobUid} not found for project {projectId}.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -144,18 +144,18 @@ x-paths:
code: SUCCESS
data:
items:
- authorized: 'true'
- authorized: true
batchUid: 559ce40f2789
createdDate: '2015-11-21T11:51:17Z'
hasError: 'false'
hasError: false
modifiedDate: '2015-11-21T11:51:17Z'
projectId: asf53fds34
status: DRAFT
translationJobUid: 635gf40f9846
- authorized: 'true'
- authorized: true
batchUid: 456dv32d0934
createdDate: '2015-11-21T11:51:17Z'
hasError: 'false'
hasError: false
modifiedDate: '2015-11-22T10:24:14Z'
projectId: asf53fds34
status: EXECUTING
Expand Down Expand Up @@ -210,9 +210,9 @@ x-paths:
response:
value:
response:
code: OK
code: SUCCESS
data:
authorized: 'true'
authorized: true
files:
- errors: ''
fileUri: files/example1.json
Expand Down Expand Up @@ -253,10 +253,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -326,10 +326,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -504,12 +504,12 @@ x-paths:
content:
application/json:
schema:
$ref: '../openapi.yaml#/components/schemas/FilesAPIUploadAcceptedResponse'
$ref: '../api_common.yaml#/components/schemas/NotEmptyResponse'
examples:
response:
value:
response:
code: SUCCESS
code: ACCEPTED
data:
message: >-
Your file was successfully uploaded. Word and string
Expand All @@ -526,10 +526,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand All @@ -548,10 +548,10 @@ x-paths:
response:
code: RESOURCE_LOCKED
errors:
key: resource.locked
message: >-
The file is currently being processed and will be
available in a few minutes.
- key: resource.locked
message: >-
The file is currently being processed and will be
available in a few minutes.
429:
$ref: '../api_common.yaml#/components/responses/Error429ResponseDefinition'
500:
Expand Down Expand Up @@ -736,7 +736,6 @@ x-paths:
value:
response:
code: ACCEPTED
data:
404:
description: Batch provided in path is not found
content:
Expand All @@ -749,10 +748,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
429:
$ref: '../api_common.yaml#/components/responses/Error429ResponseDefinition'
400:
Expand Down
43 changes: 21 additions & 22 deletions spec/job_batches_v2/job_batches_endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: job.not.found
message: >-
Job {translationJobUid} not found for project {projectId}.
- key: job.not.found
message: >-
Job {translationJobUid} not found for project {projectId}.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -145,18 +145,18 @@ x-paths:
code: SUCCESS
data:
items:
- authorized: 'true'
- authorized: true
batchUid: 559ce40f2789
createdDate: '2015-11-21T11:51:17Z'
hasError: 'false'
hasError: false
modifiedDate: '2015-11-21T11:51:17Z'
projectId: asf53fds34
status: DRAFT
translationJobUid: 635gf40f9846
- authorized: 'true'
- authorized: true
batchUid: 456dv32d0934
createdDate: '2015-11-21T11:51:17Z'
hasError: 'false'
hasError: false
modifiedDate: '2015-11-22T10:24:14Z'
projectId: asf53fds34
status: EXECUTING
Expand Down Expand Up @@ -212,9 +212,9 @@ x-paths:
response:
value:
response:
code: OK
code: SUCCESS
data:
authorized: 'true'
authorized: true
files:
- errors: ''
fileUri: files/example1.json
Expand Down Expand Up @@ -251,10 +251,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -321,10 +321,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
400:
$ref: '../api_common.yaml#/components/responses/Error400ResponseDefinition'
401:
Expand Down Expand Up @@ -513,7 +513,6 @@ x-paths:
value:
response:
code: ACCEPTED
data:
404:
description: Batch provided in path is not found
content:
Expand All @@ -526,10 +525,10 @@ x-paths:
response:
code: VALIDATION_ERROR
errors:
key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
- key: batch.not.found
message: >-
Batch with uid={batchUid} and projectId={projectId}
not found.
429:
$ref: '../api_common.yaml#/components/responses/Error429ResponseDefinition'
400:
Expand Down
3 changes: 3 additions & 0 deletions spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9855,6 +9855,9 @@ components:
example: '2015-11-21T01:51:17.000Z'
format: date-time
type: string
hasError:
description: The flag showing if this Batch has at least one error
type: boolean
type: object
BatchItemV1:
description: Associates an uploaded file with particular Batch. BatchItem is handled
Expand Down