Skip to content

Commit 5b486ea

Browse files
authored
feat(API): Add support for update_custom_metadata option on upload (#882)
1 parent 840ba15 commit 5b486ea

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

clients/java/src/test/java/com/phrase/client/api/UploadsApiTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
9898
String localeId = "en";
9999
String tags = null;
100100
Boolean updateTranslations = null;
101+
Boolean updateCustomMetadata = null;
101102
Boolean updateTranslationKeys = true;
102103
Boolean updateTranslationsOnSourceMatch = null;
103104
Boolean updateDescriptions = null;
@@ -121,7 +122,7 @@ public void uploadCreateTest() throws ApiException, IOException, InterruptedExce
121122
formatOptionsMap.put("more_options", nestedFormatOptionsMap);
122123

123124
Upload response = api.uploadCreate(projectId, file, fileFormat, localeId, xPhraseAppOTP, branch,
124-
tags, updateTranslations, updateTranslationKeys, updateTranslationsOnSourceMatch,
125+
tags, updateTranslations, updateCustomMetadata, updateTranslationKeys, updateTranslationsOnSourceMatch,
125126
updateDescriptions, convertEmoji, skipUploadTags, skipUnverification, fileEncoding,
126127
localeMapping, formatOptionsMap, autotranslate, verifyMentionedTranslations, markReviewed, tagOnlyAffectedKeys,
127128
translationKeyPrefix);

clients/php/test/Api/UploadsApiTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public function testUploadCreate()
9595
null, # branch
9696
null, # tags
9797
null, # update_translations
98+
null, # update_custom_metadata
9899
null, # update_translation_keys
99100
null, # update_translations_on_source_match
100101
null, # update_descriptions

doc/compiled.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14658,6 +14658,12 @@
1465814658
"type": "boolean",
1465914659
"example": null
1466014660
},
14661+
"update_custom_metadata": {
14662+
"description": "Indicates whether existing custom metadata properties should be updated with the file content",
14663+
"type": "boolean",
14664+
"default": true,
14665+
"example": null
14666+
},
1466114667
"update_translation_keys": {
1466214668
"description": "Pass `false` here to prevent new keys from being created and existing keys updated.",
1466314669
"type": "boolean",

paths/uploads/create.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ requestBody:
8888
description: Indicates whether existing translations should be updated with the file content.
8989
type: boolean
9090
example:
91+
update_custom_metadata:
92+
description: Indicates whether existing custom metadata properties should be updated with the file content
93+
type: boolean
94+
default: true
95+
example:
9196
update_translation_keys:
9297
description: Pass `false` here to prevent new keys from being created and existing keys updated.
9398
type: boolean

0 commit comments

Comments
 (0)