From 669b8481e487211d2d575d93c507c2bbc99f3503 Mon Sep 17 00:00:00 2001 From: Sven Dunemann Date: Mon, 26 Aug 2024 18:47:24 +0200 Subject: [PATCH] Document locale_ids param --- doc/compiled.json | 13 ++++++++++++- paths/locale_downloads/create.yaml | 10 ++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 9c739ab6..f27bcc52 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -8924,6 +8924,17 @@ "type": "boolean", "example": null }, + "locale_ids": { + "description": "Locale IDs or locale names", + "type": "array", + "items": { + "type": "string" + }, + "example": [ + "de", + "en" + ] + }, "fallback_locale_id": { "description": "If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to true.", "type": "string", @@ -8979,7 +8990,7 @@ "x-code-samples": [ { "lang": "Curl", - "source": "\ncurl \"https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\",\"file_format\":\"yml\",\"tags\":\"feature1,feature\",\"custom_metadata_filters\":{\"tone\":\"friendly\"}}' \\\n -H 'Content-Type: application/json'" + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"branch\":\"my-feature-branch\",\"file_format\":\"yml\",\"tags\":\"feature1,feature\",\"custom_metadata_filters\":{\"tone\":\"friendly\"}}' \\\n -H 'Content-Type: application/json'" }, { "lang": "CLI v2", diff --git a/paths/locale_downloads/create.yaml b/paths/locale_downloads/create.yaml index 140c6910..af4c1742 100644 --- a/paths/locale_downloads/create.yaml +++ b/paths/locale_downloads/create.yaml @@ -1,4 +1,3 @@ ---- summary: Initiate async download of a locale description: Prepare a locale for download in a specific file format. operationId: locale_download/create @@ -65,6 +64,14 @@ requestBody: description: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project. type: boolean example: + locale_ids: + description: Locale IDs or locale names + type: array + items: + type: string + example: + - de + - en fallback_locale_id: description: If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to true. type: string @@ -101,7 +108,6 @@ responses: x-code-samples: - lang: Curl source: |- - curl "https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads" \ -u USERNAME_OR_ACCESS_TOKEN \ -X POST \