Skip to content

Commit f10bd88

Browse files
committed
JOBSBATCH-222 Reflect new limits for File URI in the job batches.
1 parent ebcb1c2 commit f10bd88

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

spec/job_batches_v1/job_batches_endpoints.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,12 @@ x-paths:
362362
363363
364364
Example: `/myproject/i18n/ui.properties`
365+
366+
367+
**Validation**: Must not be blank and must not exceed 512 characters.
365368
type: string
369+
minLength: 1
370+
maxLength: 512
366371
fileType:
367372
$ref: '#/components/schemas/FileType'
368373
authorize:
@@ -574,7 +579,12 @@ x-paths:
574579
575580
576581
Example: `/myproject/i18n/ui.properties`
582+
583+
584+
**Validation**: Must not be blank and must not exceed 512 characters.
577585
type: string
586+
minLength: 1
587+
maxLength: 512
578588
fileType:
579589
$ref: '#/components/schemas/FileType'
580590
authorize:

spec/job_batches_v2/job_batches_endpoints.yaml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ x-paths:
7878
errors:
7979
- key: userUids
8080
message: "Parameter 'userUids' has invalid value '[]' (must contain exactly 1 user)"
81+
invalid_file_uri_length:
82+
value:
83+
response:
84+
code: VALIDATION_ERROR
85+
errors:
86+
- key: fileUris[0]
87+
message: "File URI must not exceed 512 characters"
8188
invalid_due_date_format:
8289
value:
8390
response:
@@ -353,6 +360,13 @@ x-paths:
353360
errors:
354361
- key: batch.not.suitable
355362
message: "Batch is not in suitable state for this action"
363+
invalid_file_uri:
364+
value:
365+
response:
366+
code: VALIDATION_ERROR
367+
errors:
368+
- key: fileUri
369+
message: "File URI must not exceed 512 characters"
356370
401:
357371
$ref: '#/components/responses/Error401ResponseDefinition'
358372
500:
@@ -432,7 +446,12 @@ x-paths:
432446
433447
434448
Example: `/myproject/i18n/ui.properties`
449+
450+
451+
**Validation**: Must not be blank and must not exceed 512 characters.
435452
type: string
453+
minLength: 1
454+
maxLength: 512
436455
fileType:
437456
$ref: '#/components/schemas/FileType'
438457
authorize:
@@ -716,13 +735,16 @@ components:
716735
description: The UID of the previously created translation job.
717736
type: string
718737
fileUris:
719-
description: A list of File URI's to be uploaded later. Must be a non-empty array with unique values.
738+
description: >-
739+
A list of File URI's to be uploaded later. Must be a non-empty array with unique values.
740+
Each file URI must not be blank and must not exceed 512 characters.
720741
type: array
721742
minItems: 1
722743
uniqueItems: true
723744
items:
724745
type: string
725746
minLength: 1
747+
maxLength: 512
726748
localeWorkflows:
727749
description: Optional array of workflow configurations for target locales
728750
type: array
@@ -808,8 +830,11 @@ components:
808830
- REGISTER_FILE
809831
type: string
810832
fileUri:
811-
description: fileUri to be cancelled or registred
833+
description: >-
834+
File URI to be cancelled or registered. Must not be blank and must not exceed 512 characters.
812835
type: string
836+
minLength: 1
837+
maxLength: 512
813838
reason:
814839
description: any text to describe the reason the file is canceled
815840
type: string

0 commit comments

Comments
 (0)