Skip to content

Commit f61eaab

Browse files
author
Phrase
committed
1 parent 29500d0 commit f61eaab

242 files changed

Lines changed: 269 additions & 256 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api/openapi.yaml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34780,8 +34780,10 @@ paths:
3478034780
- Linked Keys
3478134781
x-accepts: application/json
3478234782
post:
34783-
description: Creates links between a given parent key and one or more child
34784-
keys.
34783+
description: |
34784+
Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together.
34785+
34786+
Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
3478534787
operationId: key_links/create
3478634788
parameters:
3478734789
- description: Two-Factor-Authentication token (optional)
@@ -34811,6 +34813,10 @@ paths:
3481134813
requestBody:
3481234814
content:
3481334815
application/json:
34816+
example:
34817+
child_key_ids:
34818+
- ijkl9012mnop3456ijkl9012mnop3456
34819+
- abcd1234efgh5678abcd1234efgh5678
3481434820
schema:
3481534821
$ref: '#/components/schemas/key_links_create_parameters'
3481634822
required: true
@@ -34820,7 +34826,7 @@ paths:
3482034826
application/json:
3482134827
schema:
3482234828
$ref: '#/components/schemas/key_link'
34823-
description: Created
34829+
description: Key link reference created.
3482434830
"400":
3482534831
description: "Bad request. The request could not be parsed or a parameter\
3482634832
\ failed validation. Verify the request body, the content type, and the\
@@ -34889,6 +34895,13 @@ paths:
3488934895
summary: Link child keys to a parent key
3489034896
tags:
3489134897
- Linked Keys
34898+
x-code-samples:
34899+
- lang: Curl
34900+
source: |-
34901+
curl -X POST "https://api.phrase.com/v2/projects/:project_id/keys/:id/key_links" \
34902+
-u USERNAME_OR_ACCESS_TOKEN \
34903+
-H "Content-Type: application/json" \
34904+
-d '{"child_key_ids": ["ijkl9012mnop3456ijkl9012mnop3456", "abcd1234efgh5678abcd1234efgh5678"]}'
3489234905
x-content-type: application/json
3489334906
x-accepts: application/json
3489434907
/projects/{project_id}/keys/{id}/key_links/{child_key_id}:
@@ -43801,11 +43814,11 @@ components:
4380143814
key_links_create_parameters:
4380243815
properties:
4380343816
child_key_ids:
43804-
description: "The IDs of the child keys to link to the parent key. Can be\
43805-
\ left empty, to only mark the given translation-key as parent"
43817+
description: Codes of the keys to link as children. Pass an empty array
43818+
to mark the parent key without linking any children.
4380643819
example:
43807-
- child_key_id1
43808-
- child_key_id2
43820+
- ijkl9012mnop3456ijkl9012mnop3456
43821+
- abcd1234efgh5678abcd1234efgh5678
4380943822
items:
4381043823
type: string
4381143824
type: array

docs/KeyLinksCreateParameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**childKeyIds** | **List<String>** | The IDs of the child keys to link to the parent key. Can be left empty, to only mark the given translation-key as parent |
9+
**childKeyIds** | **List<String>** | Codes of the keys to link as children. Pass an empty array to mark the parent key without linking any children. |
1010

1111

1212

docs/LinkedKeysApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Name | Type | Description | Notes
101101
102102
Link child keys to a parent key
103103

104-
Creates links between a given parent key and one or more child keys.
104+
Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together. Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
105105

106106
### Example
107107
```java
@@ -172,7 +172,7 @@ Name | Type | Description | Notes
172172
### HTTP response details
173173
| Status code | Description | Response headers |
174174
|-------------|-------------|------------------|
175-
**201** | Created | - |
175+
**201** | Key link reference created. | - |
176176
**400** | Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |
177177
**401** | Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. | - |
178178
**403** | Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. | * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> |

src/main/java/com/phrase/client/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import java.util.Map;
1616
import java.util.List;
1717

18-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
18+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
1919
public class ApiException extends Exception {
2020
private int code = 0;
2121
private Map<String, List<String>> responseHeaders = null;

src/main/java/com/phrase/client/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
1616
public class Configuration {
1717
private static ApiClient defaultApiClient = new ApiClient();
1818

src/main/java/com/phrase/client/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
1616
public class Pair {
1717
private String name = "";
1818
private String value = "";

src/main/java/com/phrase/client/StringUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
package com.phrase.client;
1414

15-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
15+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
1616
public class StringUtil {
1717
/**
1818
* Check if the given array contains the given value (with case-insensitive comparison).

src/main/java/com/phrase/client/api/LinkedKeysApi.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public okhttp3.Call keyLinksBatchDestroyAsync(String projectId, String id, Strin
226226
* @http.response.details
227227
<table summary="Response Details" border="1">
228228
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
229-
<tr><td> 201 </td><td> Created </td><td> - </td></tr>
229+
<tr><td> 201 </td><td> Key link reference created. </td><td> - </td></tr>
230230
<tr><td> 400 </td><td> Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
231231
<tr><td> 401 </td><td> Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. </td><td> - </td></tr>
232232
<tr><td> 403 </td><td> Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
@@ -296,7 +296,7 @@ private okhttp3.Call keyLinksCreateValidateBeforeCall(String projectId, String i
296296

297297
/**
298298
* Link child keys to a parent key
299-
* Creates links between a given parent key and one or more child keys.
299+
* Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together. Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
300300
* @param projectId Project ID (required)
301301
* @param id Parent Translation Key ID (required)
302302
* @param keyLinksCreateParameters (required)
@@ -306,7 +306,7 @@ private okhttp3.Call keyLinksCreateValidateBeforeCall(String projectId, String i
306306
* @http.response.details
307307
<table summary="Response Details" border="1">
308308
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
309-
<tr><td> 201 </td><td> Created </td><td> - </td></tr>
309+
<tr><td> 201 </td><td> Key link reference created. </td><td> - </td></tr>
310310
<tr><td> 400 </td><td> Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
311311
<tr><td> 401 </td><td> Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. </td><td> - </td></tr>
312312
<tr><td> 403 </td><td> Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
@@ -322,7 +322,7 @@ public KeyLink keyLinksCreate(String projectId, String id, KeyLinksCreateParamet
322322

323323
/**
324324
* Link child keys to a parent key
325-
* Creates links between a given parent key and one or more child keys.
325+
* Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together. Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
326326
* @param projectId Project ID (required)
327327
* @param id Parent Translation Key ID (required)
328328
* @param keyLinksCreateParameters (required)
@@ -332,7 +332,7 @@ public KeyLink keyLinksCreate(String projectId, String id, KeyLinksCreateParamet
332332
* @http.response.details
333333
<table summary="Response Details" border="1">
334334
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
335-
<tr><td> 201 </td><td> Created </td><td> - </td></tr>
335+
<tr><td> 201 </td><td> Key link reference created. </td><td> - </td></tr>
336336
<tr><td> 400 </td><td> Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
337337
<tr><td> 401 </td><td> Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. </td><td> - </td></tr>
338338
<tr><td> 403 </td><td> Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
@@ -349,7 +349,7 @@ public ApiResponse<KeyLink> keyLinksCreateWithHttpInfo(String projectId, String
349349

350350
/**
351351
* Link child keys to a parent key (asynchronously)
352-
* Creates links between a given parent key and one or more child keys.
352+
* Designates a translation key as a parent and links one or more child keys to it. Once linked, child keys receive a special reference marker as their translation content, signalling that their translations are derived from the parent. Use this when you want to group related keys — for example, a short label and its long-form variant — so translators see them in context together. Pass an empty child_key_ids array to mark the key as a parent without linking any children yet. Both the parent key and every child key must belong to the main project; branch keys cannot participate in key links. A child key can have at most one parent at a time; attempting to link a child that already has a parent returns a 422 error with code CHILD_IS_ALREADY_LINKED. Parent and child key plurality must match — linking a plural child to a non-plural parent (or vice versa) also returns a 422.
353353
* @param projectId Project ID (required)
354354
* @param id Parent Translation Key ID (required)
355355
* @param keyLinksCreateParameters (required)
@@ -360,7 +360,7 @@ public ApiResponse<KeyLink> keyLinksCreateWithHttpInfo(String projectId, String
360360
* @http.response.details
361361
<table summary="Response Details" border="1">
362362
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
363-
<tr><td> 201 </td><td> Created </td><td> - </td></tr>
363+
<tr><td> 201 </td><td> Key link reference created. </td><td> - </td></tr>
364364
<tr><td> 400 </td><td> Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>
365365
<tr><td> 401 </td><td> Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry. </td><td> - </td></tr>
366366
<tr><td> 403 </td><td> Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions. </td><td> * X-Rate-Limit-Limit - <br> * X-Rate-Limit-Remaining - <br> * X-Rate-Limit-Reset - <br> </td></tr>

src/main/java/com/phrase/client/auth/ApiKeyAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.util.Map;
1818
import java.util.List;
1919

20-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
20+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
2121
public class ApiKeyAuth implements Authentication {
2222
private final String location;
2323
private final String paramName;

src/main/java/com/phrase/client/auth/HttpBearerAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import java.util.Map;
1818
import java.util.List;
1919

20-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-25T13:41:04.870242886Z[Etc/UTC]")
20+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2026-06-26T10:57:49.089322498Z[Etc/UTC]")
2121
public class HttpBearerAuth implements Authentication {
2222
private final String scheme;
2323
private String bearerToken;

0 commit comments

Comments
 (0)