From c1b7a848ecc9176d99a7d055a542fb5fcfee99d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jul 2026 06:54:20 +0000 Subject: [PATCH 01/10] feat(API): add key format annotations list endpoint #STRINGS-3028 --- main.yaml | 2 ++ paths.yaml | 3 ++ paths/key_format_annotations/index.yaml | 44 +++++++++++++++++++++++++ schemas.yaml | 2 ++ schemas/format_annotation.yaml | 18 ++++++++++ 5 files changed, 69 insertions(+) create mode 100644 paths/key_format_annotations/index.yaml create mode 100644 schemas/format_annotation.yaml diff --git a/main.yaml b/main.yaml index 3c048b82c..c52b9768d 100644 --- a/main.yaml +++ b/main.yaml @@ -135,6 +135,7 @@ tags: - name: Job Template Locales - name: Job Templates - name: Jobs + - name: Key Format Annotations - name: Keys - name: Linked Keys - name: Locales @@ -274,6 +275,7 @@ x-tagGroups: - Projects - Locales - Keys + - Key Format Annotations - Translations - Uploads - Tags diff --git a/paths.yaml b/paths.yaml index 2a5296eab..07c050486 100644 --- a/paths.yaml +++ b/paths.yaml @@ -724,6 +724,9 @@ "/projects/{project_id}/keys/{id}/key_links/{child_key_id}": delete: "$ref": "./paths/key_links/destroy.yaml" +"/projects/{project_id}/keys/{id}/format_annotations": + get: + "$ref": "./paths/key_format_annotations/index.yaml" "/accounts/{account_id}/automations": get: "$ref": "./paths/automations/index.yaml" diff --git a/paths/key_format_annotations/index.yaml b/paths/key_format_annotations/index.yaml new file mode 100644 index 000000000..2db7c8ba2 --- /dev/null +++ b/paths/key_format_annotations/index.yaml @@ -0,0 +1,44 @@ +--- +summary: List format annotations for a key +description: | + Returns the format annotations stored directly on a translation key. Format annotations + capture the original file-format snippet recorded when the key was imported — for example, + an ARB placeholder block, an XLIFF 2 note, or an Android XML context string. + + Only annotations stored directly on the key are returned. Annotations stored on the + key's translations (per locale) are excluded. + + Results are ordered by insertion order (ascending by internal ID) and capped at 1,000 + entries. When a key has more than 1,000 stored annotations, only the first 1,000 are + returned without an error or any indication that the list was truncated. +operationId: key_format_annotations/list +tags: + - Key Format Annotations +parameters: + - "$ref": "../../parameters.yaml#/X-PhraseApp-OTP" + - "$ref": "../../parameters.yaml#/project_id" + - "$ref": "../../parameters.yaml#/id" + - "$ref": "../../parameters.yaml#/branch" +responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + "$ref": "../../schemas/format_annotation.yaml#/format_annotation" + example: + - file_format: arb + original_representation: '{"placeholders": {"name": {"type": "String"}}}' + - file_format: xliff_2 + original_representation: "Shown on the welcome screen" + '401': + "$ref": "../../responses.yaml#/401" + '403': + "$ref": "../../responses.yaml#/403" + '404': + "$ref": "../../responses.yaml#/404" + '429': + "$ref": "../../responses.yaml#/429" +x-cli-version: "2.5" diff --git a/schemas.yaml b/schemas.yaml index 02c46b8f4..799c01aca 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -168,6 +168,8 @@ schemas: "$ref": schemas/organization_job_template_details.yaml#/organization_job_template_details key_link: "$ref": schemas/key_link.yaml#/key_link + format_annotation: + "$ref": schemas/format_annotation.yaml#/format_annotation repo_sync: "$ref": schemas/repo_sync.yaml#/repo_sync repo_sync_event: diff --git a/schemas/format_annotation.yaml b/schemas/format_annotation.yaml new file mode 100644 index 000000000..2d60d9087 --- /dev/null +++ b/schemas/format_annotation.yaml @@ -0,0 +1,18 @@ +format_annotation: + type: object + properties: + file_format: + type: string + description: > + The public file format name that produced this annotation. Possible values include + `arb`, `xliff_2`, `xlf`, `xml`, `ts`, and `strings_catalog`. Internal-only format + variants (such as `xliff_jobsync`) are never returned; they are collapsed to their + public equivalent (for example, `xliff_jobsync` is reported as `xliff_2`). + example: arb + original_representation: + type: string + description: > + The original file-format snippet captured when the key was imported, returned + byte-for-byte without transformation, reformatting, or additional escaping. + May contain multi-line content. + example: '{"placeholders": {"name": {"type": "String"}}}' From d2f119be63c3669f53cb5d0df1cb3d19e31e7a65 Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 09:14:56 +0200 Subject: [PATCH 02/10] fix(CI): update compiled.json and remove broken TypeScript enum Regenerate doc/compiled.json so compare-output passes. Remove the `enum` constraint from `cldr_version` in the ICU skeleton endpoint to work around a typescript-fetch generator bug where inline enums inside inline request body schemas produce a reference to an undefined type (IcuSkeletonParametersCldrVersionEnum). Valid values are documented in the field description; server-side validation is unchanged. Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 87 ++++++++++++++++++++++++++++++++++++++--- paths/icu/skeleton.yaml | 3 -- 2 files changed, 82 insertions(+), 8 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index dd99f2c9c..71cd3fd9d 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -112,6 +112,9 @@ { "name": "Jobs" }, + { + "name": "Key Format Annotations" + }, { "name": "Keys" }, @@ -217,6 +220,7 @@ "Projects", "Locales", "Keys", + "Key Format Annotations", "Translations", "Uploads", "Tags", @@ -4870,6 +4874,21 @@ ] } }, + "format_annotation": { + "type": "object", + "properties": { + "file_format": { + "type": "string", + "description": "The public file format name that produced this annotation. Possible values include `arb`, `xliff_2`, `xlf`, `xml`, `ts`, and `strings_catalog`. Internal-only format variants (such as `xliff_jobsync`) are never returned; they are collapsed to their public equivalent (for example, `xliff_jobsync` is reported as `xliff_2`).\n", + "example": "arb" + }, + "original_representation": { + "type": "string", + "description": "The original file-format snippet captured when the key was imported, returned byte-for-byte without transformation, reformatting, or additional escaping. May contain multi-line content.\n", + "example": "{\"placeholders\": {\"name\": {\"type\": \"String\"}}}" + } + } + }, "repo_sync": { "type": "object", "title": "repo_sync", @@ -5451,7 +5470,7 @@ }, "job_updated_since": { "description": "filter by jobs updated since given date", - "example": "2013-02-21T00:00:00.000Z", + "example": "2013-02-21T00:00:00Z", "name": "updated_since", "in": "query", "schema": { @@ -5733,10 +5752,6 @@ "cldr_version": { "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", "type": "string", - "enum": [ - "legacy", - "cldr_41" - ], "example": "cldr_41" } }, @@ -31488,6 +31503,68 @@ ] } }, + "/projects/{project_id}/keys/{id}/format_annotations": { + "get": { + "summary": "List format annotations for a key", + "description": "Returns the format annotations stored directly on a translation key. Format annotations\ncapture the original file-format snippet recorded when the key was imported — for example,\nan ARB placeholder block, an XLIFF 2 note, or an Android XML context string.\n\nOnly annotations stored directly on the key are returned. Annotations stored on the\nkey's translations (per locale) are excluded.\n\nResults are ordered by insertion order (ascending by internal ID) and capped at 1,000\nentries. When a key has more than 1,000 stored annotations, only the first 1,000 are\nreturned without an error or any indication that the list was truncated.\n", + "operationId": "key_format_annotations/list", + "tags": [ + "Key Format Annotations" + ], + "parameters": [ + { + "$ref": "#/components/parameters/X-PhraseApp-OTP" + }, + { + "$ref": "#/components/parameters/project_id" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/branch" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/format_annotation" + } + }, + "example": [ + { + "file_format": "arb", + "original_representation": "{\"placeholders\": {\"name\": {\"type\": \"String\"}}}" + }, + { + "file_format": "xliff_2", + "original_representation": "Shown on the welcome screen" + } + ] + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "403": { + "$ref": "#/components/responses/403" + }, + "404": { + "$ref": "#/components/responses/404" + }, + "429": { + "$ref": "#/components/responses/429" + } + }, + "x-cli-version": "2.5" + } + }, "/accounts/{account_id}/automations": { "get": { "summary": "List automations", diff --git a/paths/icu/skeleton.yaml b/paths/icu/skeleton.yaml index 830c0e132..ed8fbd552 100644 --- a/paths/icu/skeleton.yaml +++ b/paths/icu/skeleton.yaml @@ -69,9 +69,6 @@ requestBody: Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted. type: string - enum: - - legacy - - cldr_41 example: cldr_41 oneOf: - required: From 195e592a3e84643038b4a4d299506fffd3282eaa Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 09:34:12 +0200 Subject: [PATCH 03/10] fix(CI): restore enum, fix schema title, regenerate compiled.json Restore `cldr_version` enum values (removed in previous commit, which oasdiff flagged as breaking). Change the inline request body schema title from `icu/skeleton/parameters` to `icu_skeleton_parameters` so the TypeScript-fetch generator can correctly derive and emit the enum type declaration (the slash-based title caused the generator to reference IcuSkeletonParametersCldrVersionEnum without emitting its definition). Regenerate compiled.json with the project-installed swagger-cli to match CI output exactly. Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 8 ++++++-- paths/icu/skeleton.yaml | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 71cd3fd9d..d89c9e84d 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -5470,7 +5470,7 @@ }, "job_updated_since": { "description": "filter by jobs updated since given date", - "example": "2013-02-21T00:00:00Z", + "example": "2013-02-21T00:00:00.000Z", "name": "updated_since", "in": "query", "schema": { @@ -5715,7 +5715,7 @@ "application/json": { "schema": { "type": "object", - "title": "icu/skeleton/parameters", + "title": "icu_skeleton_parameters", "properties": { "content": { "description": "Source ICU message string to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided.\n", @@ -5752,6 +5752,10 @@ "cldr_version": { "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", "type": "string", + "enum": [ + "legacy", + "cldr_41" + ], "example": "cldr_41" } }, diff --git a/paths/icu/skeleton.yaml b/paths/icu/skeleton.yaml index ed8fbd552..96a29afb1 100644 --- a/paths/icu/skeleton.yaml +++ b/paths/icu/skeleton.yaml @@ -23,7 +23,7 @@ requestBody: application/json: schema: type: object - title: icu/skeleton/parameters + title: icu_skeleton_parameters properties: content: description: > @@ -69,6 +69,9 @@ requestBody: Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted. type: string + enum: + - legacy + - cldr_41 example: cldr_41 oneOf: - required: From a90fadf739852a10a84e243d73f3c6bb363035fa Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 09:46:40 +0200 Subject: [PATCH 04/10] fix(CI): extract cldr_version enum to named schema to fix TypeScript build The TypeScript-fetch generator fails to emit the enum declaration for inline string enums inside inline request body schemas that also use oneOf (a known generator bug). Moving cldr_version to a named component schema (icu_skeleton_cldr_version) gives the generator a proper named type, which it handles correctly. Enum values are unchanged so oasdiff does not flag a breaking change. Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 17 ++++++++++------- paths/icu/skeleton.yaml | 10 +--------- schemas.yaml | 2 ++ schemas/icu.yaml | 11 +++++++++++ 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index d89c9e84d..c98d6cb30 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4460,6 +4460,15 @@ "de": "{number, plural, one {} other {}}" } }, + "icu_skeleton_cldr_version": { + "type": "string", + "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", + "enum": [ + "legacy", + "cldr_41" + ], + "example": "cldr_41" + }, "notification": { "type": "object", "title": "notification", @@ -5750,13 +5759,7 @@ "example": false }, "cldr_version": { - "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", - "type": "string", - "enum": [ - "legacy", - "cldr_41" - ], - "example": "cldr_41" + "$ref": "#/components/schemas/icu_skeleton_cldr_version" } }, "oneOf": [ diff --git a/paths/icu/skeleton.yaml b/paths/icu/skeleton.yaml index 96a29afb1..31c8ff196 100644 --- a/paths/icu/skeleton.yaml +++ b/paths/icu/skeleton.yaml @@ -64,15 +64,7 @@ requestBody: type: boolean example: false cldr_version: - description: >- - Pluralization rule set to apply when constructing skeletons. - Accepted values are `legacy` and `cldr_41`. Defaults to - `legacy` when omitted. - type: string - enum: - - legacy - - cldr_41 - example: cldr_41 + "$ref": "../../schemas/icu.yaml#/skeleton_cldr_version" oneOf: - required: - content diff --git a/schemas.yaml b/schemas.yaml index 799c01aca..3d88d8cbd 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -156,6 +156,8 @@ schemas: "$ref": schemas/variable.yaml#/variable icu: "$ref": schemas/icu.yaml#/skeleton + icu_skeleton_cldr_version: + "$ref": schemas/icu.yaml#/skeleton_cldr_version notification: "$ref": schemas/notification.yaml#/notification notification_group: diff --git a/schemas/icu.yaml b/schemas/icu.yaml index f328ba1b7..1220a8808 100644 --- a/schemas/icu.yaml +++ b/schemas/icu.yaml @@ -9,3 +9,14 @@ skeleton: example: en: "{number, plural, one {} other {}}" de: "{number, plural, one {} other {}}" + +skeleton_cldr_version: + type: string + description: >- + Pluralization rule set to apply when constructing skeletons. + Accepted values are `legacy` and `cldr_41`. Defaults to + `legacy` when omitted. + enum: + - legacy + - cldr_41 + example: cldr_41 From 7903b2cfd0b370cc5b64f0ab932e2c0b4471fc98 Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 10:09:21 +0200 Subject: [PATCH 05/10] chore: trigger PR CI re-run Co-Authored-By: Claude Sonnet 4.6 From 1d9bf9f70acded7e79be10886cf140b4bfe520a7 Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 11:06:54 +0200 Subject: [PATCH 06/10] fix(API): address Copilot review comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert ICU skeleton schema title to icu/skeleton/parameters — consistent with all other request body schemas in the repo; the title change was an intermediate attempt that is no longer needed. Add missing pieces to the format annotations endpoint: - Rate-limit headers on the 200 response - 400 response - Scoped 403 description noting the required read scope Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 19 +++++++++++++++++-- paths/icu/skeleton.yaml | 2 +- paths/key_format_annotations/index.yaml | 10 ++++++++++ 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index c98d6cb30..7454cc09a 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -5724,7 +5724,7 @@ "application/json": { "schema": { "type": "object", - "title": "icu_skeleton_parameters", + "title": "icu/skeleton/parameters", "properties": { "content": { "description": "Source ICU message string to derive skeletons from. Mutually exclusive with `id`; exactly one of the two must be provided.\n", @@ -31554,13 +31554,28 @@ } ] } + }, + "headers": { + "X-Rate-Limit-Limit": { + "$ref": "#/components/headers/X-Rate-Limit-Limit" + }, + "X-Rate-Limit-Remaining": { + "$ref": "#/components/headers/X-Rate-Limit-Remaining" + }, + "X-Rate-Limit-Reset": { + "$ref": "#/components/headers/X-Rate-Limit-Reset" + } } }, + "400": { + "$ref": "#/components/responses/400" + }, "401": { "$ref": "#/components/responses/401" }, "403": { - "$ref": "#/components/responses/403" + "$ref": "#/components/responses/403", + "description": "Forbidden. Returned when the access token lacks the `read` scope or when the requesting user is not allowed to access keys in this project." }, "404": { "$ref": "#/components/responses/404" diff --git a/paths/icu/skeleton.yaml b/paths/icu/skeleton.yaml index 31c8ff196..6b34958a1 100644 --- a/paths/icu/skeleton.yaml +++ b/paths/icu/skeleton.yaml @@ -23,7 +23,7 @@ requestBody: application/json: schema: type: object - title: icu_skeleton_parameters + title: icu/skeleton/parameters properties: content: description: > diff --git a/paths/key_format_annotations/index.yaml b/paths/key_format_annotations/index.yaml index 2db7c8ba2..f8178c35f 100644 --- a/paths/key_format_annotations/index.yaml +++ b/paths/key_format_annotations/index.yaml @@ -33,10 +33,20 @@ responses: original_representation: '{"placeholders": {"name": {"type": "String"}}}' - file_format: xliff_2 original_representation: "Shown on the welcome screen" + headers: + X-Rate-Limit-Limit: + "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" + X-Rate-Limit-Remaining: + "$ref": "../../headers.yaml#/X-Rate-Limit-Remaining" + X-Rate-Limit-Reset: + "$ref": "../../headers.yaml#/X-Rate-Limit-Reset" + '400': + "$ref": "../../responses.yaml#/400" '401': "$ref": "../../responses.yaml#/401" '403': "$ref": "../../responses.yaml#/403" + description: Forbidden. Returned when the access token lacks the `read` scope or when the requesting user is not allowed to access keys in this project. '404': "$ref": "../../responses.yaml#/404" '429': From 607b55e72f9490244b30af462c535f360404f79a Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 11:29:07 +0200 Subject: [PATCH 07/10] docs(API): simplify format annotations descriptions Rewrite endpoint and schema descriptions to match existing style: shorter sentences, no internal implementation detail, plain English. Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 6 +++--- paths/key_format_annotations/index.yaml | 13 ++++--------- schemas/format_annotation.yaml | 11 ++++------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 7454cc09a..47d263010 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4888,12 +4888,12 @@ "properties": { "file_format": { "type": "string", - "description": "The public file format name that produced this annotation. Possible values include `arb`, `xliff_2`, `xlf`, `xml`, `ts`, and `strings_catalog`. Internal-only format variants (such as `xliff_jobsync`) are never returned; they are collapsed to their public equivalent (for example, `xliff_jobsync` is reported as `xliff_2`).\n", + "description": "The file format that produced this annotation. Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`.\n", "example": "arb" }, "original_representation": { "type": "string", - "description": "The original file-format snippet captured when the key was imported, returned byte-for-byte without transformation, reformatting, or additional escaping. May contain multi-line content.\n", + "description": "The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.\n", "example": "{\"placeholders\": {\"name\": {\"type\": \"String\"}}}" } } @@ -31513,7 +31513,7 @@ "/projects/{project_id}/keys/{id}/format_annotations": { "get": { "summary": "List format annotations for a key", - "description": "Returns the format annotations stored directly on a translation key. Format annotations\ncapture the original file-format snippet recorded when the key was imported — for example,\nan ARB placeholder block, an XLIFF 2 note, or an Android XML context string.\n\nOnly annotations stored directly on the key are returned. Annotations stored on the\nkey's translations (per locale) are excluded.\n\nResults are ordered by insertion order (ascending by internal ID) and capped at 1,000\nentries. When a key has more than 1,000 stored annotations, only the first 1,000 are\nreturned without an error or any indication that the list was truncated.\n", + "description": "Returns the format annotations stored on a translation key. Format annotations capture\nfile-format data recorded when the key was imported — for example, an ARB placeholder\nblock or an XLIFF note.\n\nResults are limited to 1,000 entries.\n", "operationId": "key_format_annotations/list", "tags": [ "Key Format Annotations" diff --git a/paths/key_format_annotations/index.yaml b/paths/key_format_annotations/index.yaml index f8178c35f..8fceba9a3 100644 --- a/paths/key_format_annotations/index.yaml +++ b/paths/key_format_annotations/index.yaml @@ -1,16 +1,11 @@ --- summary: List format annotations for a key description: | - Returns the format annotations stored directly on a translation key. Format annotations - capture the original file-format snippet recorded when the key was imported — for example, - an ARB placeholder block, an XLIFF 2 note, or an Android XML context string. + Returns the format annotations stored on a translation key. Format annotations capture + file-format data recorded when the key was imported — for example, an ARB placeholder + block or an XLIFF note. - Only annotations stored directly on the key are returned. Annotations stored on the - key's translations (per locale) are excluded. - - Results are ordered by insertion order (ascending by internal ID) and capped at 1,000 - entries. When a key has more than 1,000 stored annotations, only the first 1,000 are - returned without an error or any indication that the list was truncated. + Results are limited to 1,000 entries. operationId: key_format_annotations/list tags: - Key Format Annotations diff --git a/schemas/format_annotation.yaml b/schemas/format_annotation.yaml index 2d60d9087..5271a71de 100644 --- a/schemas/format_annotation.yaml +++ b/schemas/format_annotation.yaml @@ -4,15 +4,12 @@ format_annotation: file_format: type: string description: > - The public file format name that produced this annotation. Possible values include - `arb`, `xliff_2`, `xlf`, `xml`, `ts`, and `strings_catalog`. Internal-only format - variants (such as `xliff_jobsync`) are never returned; they are collapsed to their - public equivalent (for example, `xliff_jobsync` is reported as `xliff_2`). + The file format that produced this annotation. + Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`. example: arb original_representation: type: string description: > - The original file-format snippet captured when the key was imported, returned - byte-for-byte without transformation, reformatting, or additional escaping. - May contain multi-line content. + The original file-format snippet captured when the key was imported. + Returned as-is, may contain multi-line content. example: '{"placeholders": {"name": {"type": "String"}}}' From 8e3c006b1612a4cc5d2c3463f35b71842f2c8c2d Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 11:36:03 +0200 Subject: [PATCH 08/10] docs(API): use xliff_2 note as example for format annotations Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 10 +++------- paths/key_format_annotations/index.yaml | 4 +--- schemas/format_annotation.yaml | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 47d263010..370cebfd3 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4889,12 +4889,12 @@ "file_format": { "type": "string", "description": "The file format that produced this annotation. Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`.\n", - "example": "arb" + "example": "xliff_2" }, "original_representation": { "type": "string", "description": "The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.\n", - "example": "{\"placeholders\": {\"name\": {\"type\": \"String\"}}}" + "example": "header" } } }, @@ -31544,13 +31544,9 @@ } }, "example": [ - { - "file_format": "arb", - "original_representation": "{\"placeholders\": {\"name\": {\"type\": \"String\"}}}" - }, { "file_format": "xliff_2", - "original_representation": "Shown on the welcome screen" + "original_representation": "header" } ] } diff --git a/paths/key_format_annotations/index.yaml b/paths/key_format_annotations/index.yaml index 8fceba9a3..102886a34 100644 --- a/paths/key_format_annotations/index.yaml +++ b/paths/key_format_annotations/index.yaml @@ -24,10 +24,8 @@ responses: items: "$ref": "../../schemas/format_annotation.yaml#/format_annotation" example: - - file_format: arb - original_representation: '{"placeholders": {"name": {"type": "String"}}}' - file_format: xliff_2 - original_representation: "Shown on the welcome screen" + original_representation: 'header' headers: X-Rate-Limit-Limit: "$ref": "../../headers.yaml#/X-Rate-Limit-Limit" diff --git a/schemas/format_annotation.yaml b/schemas/format_annotation.yaml index 5271a71de..285d6cd2d 100644 --- a/schemas/format_annotation.yaml +++ b/schemas/format_annotation.yaml @@ -6,10 +6,10 @@ format_annotation: description: > The file format that produced this annotation. Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`. - example: arb + example: xliff_2 original_representation: type: string description: > The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content. - example: '{"placeholders": {"name": {"type": "String"}}}' + example: 'header' From 6fd5dcf9687ee118caefd19b33055cd02d8e7ed4 Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 11:40:30 +0200 Subject: [PATCH 09/10] docs(API): remove specific format list from file_format description Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 2 +- schemas/format_annotation.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index 370cebfd3..ea6ef432f 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4888,7 +4888,7 @@ "properties": { "file_format": { "type": "string", - "description": "The file format that produced this annotation. Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`.\n", + "description": "The file format that produced this annotation.\n", "example": "xliff_2" }, "original_representation": { diff --git a/schemas/format_annotation.yaml b/schemas/format_annotation.yaml index 285d6cd2d..4ae2d8f1d 100644 --- a/schemas/format_annotation.yaml +++ b/schemas/format_annotation.yaml @@ -5,7 +5,6 @@ format_annotation: type: string description: > The file format that produced this annotation. - Possible values: `arb`, `xliff_2`, `xlf`, `xml`, `ts`, `strings_catalog`. example: xliff_2 original_representation: type: string From 940198224c34a42c3b8eee9cdf2ad9d97312b72e Mon Sep 17 00:00:00 2001 From: "franca.winter" Date: Thu, 23 Jul 2026 11:46:28 +0200 Subject: [PATCH 10/10] chore: move ICU cldr_version fix to separate PR #1223 The TypeScript generator fix for the icu/skeleton endpoint is unrelated to the format annotations endpoint. Extracted to its own PR. Co-Authored-By: Claude Sonnet 4.6 --- doc/compiled.json | 46 ++++++++++++++++++----------------------- paths/icu/skeleton.yaml | 10 ++++++++- schemas.yaml | 4 ---- schemas/icu.yaml | 11 ---------- 4 files changed, 29 insertions(+), 42 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index ea6ef432f..745096956 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -4460,15 +4460,6 @@ "de": "{number, plural, one {} other {}}" } }, - "icu_skeleton_cldr_version": { - "type": "string", - "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", - "enum": [ - "legacy", - "cldr_41" - ], - "example": "cldr_41" - }, "notification": { "type": "object", "title": "notification", @@ -4883,21 +4874,6 @@ ] } }, - "format_annotation": { - "type": "object", - "properties": { - "file_format": { - "type": "string", - "description": "The file format that produced this annotation.\n", - "example": "xliff_2" - }, - "original_representation": { - "type": "string", - "description": "The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.\n", - "example": "header" - } - } - }, "repo_sync": { "type": "object", "title": "repo_sync", @@ -5759,7 +5735,13 @@ "example": false }, "cldr_version": { - "$ref": "#/components/schemas/icu_skeleton_cldr_version" + "description": "Pluralization rule set to apply when constructing skeletons. Accepted values are `legacy` and `cldr_41`. Defaults to `legacy` when omitted.", + "type": "string", + "enum": [ + "legacy", + "cldr_41" + ], + "example": "cldr_41" } }, "oneOf": [ @@ -31540,7 +31522,19 @@ "schema": { "type": "array", "items": { - "$ref": "#/components/schemas/format_annotation" + "type": "object", + "properties": { + "file_format": { + "type": "string", + "description": "The file format that produced this annotation.\n", + "example": "xliff_2" + }, + "original_representation": { + "type": "string", + "description": "The original file-format snippet captured when the key was imported. Returned as-is, may contain multi-line content.\n", + "example": "header" + } + } } }, "example": [ diff --git a/paths/icu/skeleton.yaml b/paths/icu/skeleton.yaml index 6b34958a1..830c0e132 100644 --- a/paths/icu/skeleton.yaml +++ b/paths/icu/skeleton.yaml @@ -64,7 +64,15 @@ requestBody: type: boolean example: false cldr_version: - "$ref": "../../schemas/icu.yaml#/skeleton_cldr_version" + description: >- + Pluralization rule set to apply when constructing skeletons. + Accepted values are `legacy` and `cldr_41`. Defaults to + `legacy` when omitted. + type: string + enum: + - legacy + - cldr_41 + example: cldr_41 oneOf: - required: - content diff --git a/schemas.yaml b/schemas.yaml index 3d88d8cbd..02c46b8f4 100644 --- a/schemas.yaml +++ b/schemas.yaml @@ -156,8 +156,6 @@ schemas: "$ref": schemas/variable.yaml#/variable icu: "$ref": schemas/icu.yaml#/skeleton - icu_skeleton_cldr_version: - "$ref": schemas/icu.yaml#/skeleton_cldr_version notification: "$ref": schemas/notification.yaml#/notification notification_group: @@ -170,8 +168,6 @@ schemas: "$ref": schemas/organization_job_template_details.yaml#/organization_job_template_details key_link: "$ref": schemas/key_link.yaml#/key_link - format_annotation: - "$ref": schemas/format_annotation.yaml#/format_annotation repo_sync: "$ref": schemas/repo_sync.yaml#/repo_sync repo_sync_event: diff --git a/schemas/icu.yaml b/schemas/icu.yaml index 1220a8808..f328ba1b7 100644 --- a/schemas/icu.yaml +++ b/schemas/icu.yaml @@ -9,14 +9,3 @@ skeleton: example: en: "{number, plural, one {} other {}}" de: "{number, plural, one {} other {}}" - -skeleton_cldr_version: - type: string - description: >- - Pluralization rule set to apply when constructing skeletons. - Accepted values are `legacy` and `cldr_41`. Defaults to - `legacy` when omitted. - enum: - - legacy - - cldr_41 - example: cldr_41