Skip to content

Commit f670e27

Browse files
authored
fix(API): pass translation_key_ids when removing keys from job (#771)
1 parent 643aba1 commit f670e27

File tree

2 files changed

+54
-42
lines changed

2 files changed

+54
-42
lines changed

doc/compiled.json

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11288,29 +11288,6 @@
1128811288
},
1128911289
{
1129011290
"$ref": "#/components/parameters/id"
11291-
},
11292-
{
11293-
"description": "specify the branch to use",
11294-
"example": "my-feature-branch",
11295-
"name": "branch",
11296-
"in": "query",
11297-
"schema": {
11298-
"type": "string"
11299-
}
11300-
},
11301-
{
11302-
"description": "ids of keys that should be removed from the job",
11303-
"example": [
11304-
"abcd1234cdef1234abcd1234cdef1234"
11305-
],
11306-
"name": "translation_key_ids",
11307-
"in": "query",
11308-
"schema": {
11309-
"type": "array",
11310-
"items": {
11311-
"type": "string"
11312-
}
11313-
}
1131411291
}
1131511292
],
1131611293
"responses": {
@@ -11334,10 +11311,40 @@
1133411311
},
1133511312
{
1133611313
"lang": "CLI v2",
11337-
"source": "phrase jobs keys_delete \\\n--project_id <project_id> \\\n--id <id> \\\n--branch my-feature-branch \\\n--translation_key_ids \"abcd1234cdef1234abcd1234cdef1234\" \\\n--access_token <token>"
11314+
"source": "phrase jobs keys_delete \\\n--project_id <project_id> \\\n--id <id> \\\n--branch my-feature-branch \\\n--data '{\"branch\": \"my-feature-branch\", \"translation_key_ids\": [\"abcd1234cdef1234abcd1234cdef1234\"]}' \\\n--access_token <token>"
1133811315
}
1133911316
],
11340-
"x-cli-version": "2.5"
11317+
"requestBody": {
11318+
"required": true,
11319+
"content": {
11320+
"application/json": {
11321+
"schema": {
11322+
"type": "object",
11323+
"title": "job/keys/delete/parameters",
11324+
"required": [
11325+
"translation_key_ids"
11326+
],
11327+
"properties": {
11328+
"branch": {
11329+
"description": "specify the branch to use",
11330+
"type": "string",
11331+
"example": "my-feature-branch"
11332+
},
11333+
"translation_key_ids": {
11334+
"description": "ids of keys that should be deleted from the job",
11335+
"type": "array",
11336+
"items": {
11337+
"type": "string"
11338+
},
11339+
"example": [
11340+
"abcd1234cdef1234abcd1234cdef1234"
11341+
]
11342+
}
11343+
}
11344+
}
11345+
}
11346+
}
11347+
}
1134111348
}
1134211349
},
1134311350
"/projects/{project_id}/job_templates": {

paths/jobs/remove_keys.yaml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,6 @@ parameters:
88
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
99
- "$ref": "../../parameters.yaml#/project_id"
1010
- "$ref": "../../parameters.yaml#/id"
11-
- description: specify the branch to use
12-
example: my-feature-branch
13-
name: branch
14-
in: query
15-
schema:
16-
type: string
17-
- description: ids of keys that should be removed from the job
18-
example:
19-
- abcd1234cdef1234abcd1234cdef1234
20-
name: translation_key_ids
21-
in: query
22-
schema:
23-
type: array
24-
items:
25-
type: string
2611
responses:
2712
'204':
2813
"$ref": "../../responses.yaml#/204"
@@ -46,6 +31,26 @@ x-code-samples:
4631
--project_id <project_id> \
4732
--id <id> \
4833
--branch my-feature-branch \
49-
--translation_key_ids "abcd1234cdef1234abcd1234cdef1234" \
34+
--data '{"branch": "my-feature-branch", "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
5035
--access_token <token>
51-
x-cli-version: '2.5'
36+
requestBody:
37+
required: true
38+
content:
39+
application/json:
40+
schema:
41+
type: object
42+
title: job/keys/delete/parameters
43+
required:
44+
- translation_key_ids
45+
properties:
46+
branch:
47+
description: specify the branch to use
48+
type: string
49+
example: my-feature-branch
50+
translation_key_ids:
51+
description: ids of keys that should be deleted from the job
52+
type: array
53+
items:
54+
type: string
55+
example:
56+
- abcd1234cdef1234abcd1234cdef1234

0 commit comments

Comments
 (0)