diff --git a/doc/compiled.json b/doc/compiled.json index afba5090..cdb76302 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -30879,7 +30879,7 @@ }, "get": { "summary": "List child keys of a parent key", - "description": "Returns detailed information about a parent key, including its linked child keys.", + "description": "Returns the key link record for a parent key, including all child keys associated with it. Key linking lets translation keys share translations — a child key inherits content from its designated parent. Use this endpoint to inspect which keys are linked under a given parent before unlinking them or auditing translation consistency across related keys.\n\nThe key identified by `id` must be designated as a parent key (it must have at least one child key linked to it). Listing the links of a key that is not a parent returns 400.\n", "operationId": "key_links/index", "tags": [ "Linked Keys" @@ -30902,34 +30902,62 @@ "application/json": { "schema": { "$ref": "#/components/schemas/key_link" + }, + "example": { + "created_at": "2024-03-12T09:15:00.000Z", + "updated_at": "2024-05-20T14:32:00.000Z", + "created_by": { + "id": "a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4", + "username": "jane.doe", + "name": "Jane Doe", + "gravatar_uid": "abcdef1234567890" + }, + "updated_by": { + "id": "a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4", + "username": "jane.doe", + "name": "Jane Doe", + "gravatar_uid": "abcdef1234567890" + }, + "account": { + "id": "abcd1234abcd1234abcd1234abcd1234", + "name": "Acme Corp", + "slug": "acme-corp", + "company": "Acme Corporation", + "created_at": "2023-01-10T08:00:00.000Z", + "updated_at": "2024-01-10T08:00:00.000Z" + }, + "parent": { + "id": "f1e2d3c4f1e2d3c4f1e2d3c4f1e2d3c4", + "name": "button.submit", + "plural": false, + "use_ordinal_rules": false + }, + "children": [ + { + "id": "9a8b7c6d9a8b7c6d9a8b7c6d9a8b7c6d", + "name": "button.submit.mobile", + "plural": false, + "use_ordinal_rules": false + }, + { + "id": "1a2b3c4d1a2b3c4d1a2b3c4d1a2b3c4d", + "name": "button.submit.web", + "plural": false, + "use_ordinal_rules": false + } + ] } } } }, "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "example": { - "message": "Key is not a parent key" - } - } - } - } + "$ref": "#/components/responses/400" }, "401": { "$ref": "#/components/responses/401" }, "403": { - "$ref": "#/components/responses/403", - "description": "Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to read key links for this key." + "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" diff --git a/paths/key_links/index.yaml b/paths/key_links/index.yaml index c74519ba..498dc028 100644 --- a/paths/key_links/index.yaml +++ b/paths/key_links/index.yaml @@ -1,6 +1,9 @@ --- summary: List child keys of a parent key -description: Returns detailed information about a parent key, including its linked child keys. +description: | + Returns the key link record for a parent key, including all child keys associated with it. Key linking lets translation keys share translations — a child key inherits content from its designated parent. Use this endpoint to inspect which keys are linked under a given parent before unlinking them or auditing translation consistency across related keys. + + The key identified by `id` must be designated as a parent key (it must have at least one child key linked to it). Listing the links of a key that is not a parent returns 400. operationId: key_links/index tags: - Linked Keys @@ -15,22 +18,46 @@ responses: application/json: schema: $ref: "../../schemas/key_link.yaml#/key_link" + example: + created_at: "2024-03-12T09:15:00.000Z" + updated_at: "2024-05-20T14:32:00.000Z" + created_by: + id: "a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4" + username: "jane.doe" + name: "Jane Doe" + gravatar_uid: "abcdef1234567890" + updated_by: + id: "a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4" + username: "jane.doe" + name: "Jane Doe" + gravatar_uid: "abcdef1234567890" + account: + id: "abcd1234abcd1234abcd1234abcd1234" + name: "Acme Corp" + slug: "acme-corp" + company: "Acme Corporation" + created_at: "2023-01-10T08:00:00.000Z" + updated_at: "2024-01-10T08:00:00.000Z" + parent: + id: "f1e2d3c4f1e2d3c4f1e2d3c4f1e2d3c4" + name: "button.submit" + plural: false + use_ordinal_rules: false + children: + - id: "9a8b7c6d9a8b7c6d9a8b7c6d9a8b7c6d" + name: "button.submit.mobile" + plural: false + use_ordinal_rules: false + - id: "1a2b3c4d1a2b3c4d1a2b3c4d1a2b3c4d" + name: "button.submit.web" + plural: false + use_ordinal_rules: false '400': - description: Bad Request - content: - application/json: - schema: - type: object - properties: - message: - type: string - example: - message: "Key is not a parent key" + "$ref": "../../responses.yaml#/400" '401': "$ref": "../../responses.yaml#/401" '403': "$ref": "../../responses.yaml#/403" - description: Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to read key links for this key. '404': "$ref": "../../responses.yaml#/404" '429':