Skip to content

Commit

Permalink
fix(API): pass translation_key_ids when removing keys from job (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
theSoenke authored Jan 29, 2025
1 parent 643aba1 commit f670e27
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 42 deletions.
57 changes: 32 additions & 25 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -11288,29 +11288,6 @@
},
{
"$ref": "#/components/parameters/id"
},
{
"description": "specify the branch to use",
"example": "my-feature-branch",
"name": "branch",
"in": "query",
"schema": {
"type": "string"
}
},
{
"description": "ids of keys that should be removed from the job",
"example": [
"abcd1234cdef1234abcd1234cdef1234"
],
"name": "translation_key_ids",
"in": "query",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"responses": {
Expand All @@ -11334,10 +11311,40 @@
},
{
"lang": "CLI v2",
"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>"
"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>"
}
],
"x-cli-version": "2.5"
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "job/keys/delete/parameters",
"required": [
"translation_key_ids"
],
"properties": {
"branch": {
"description": "specify the branch to use",
"type": "string",
"example": "my-feature-branch"
},
"translation_key_ids": {
"description": "ids of keys that should be deleted from the job",
"type": "array",
"items": {
"type": "string"
},
"example": [
"abcd1234cdef1234abcd1234cdef1234"
]
}
}
}
}
}
}
}
},
"/projects/{project_id}/job_templates": {
Expand Down
39 changes: 22 additions & 17 deletions paths/jobs/remove_keys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,6 @@ parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/project_id"
- "$ref": "../../parameters.yaml#/id"
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
- description: ids of keys that should be removed from the job
example:
- abcd1234cdef1234abcd1234cdef1234
name: translation_key_ids
in: query
schema:
type: array
items:
type: string
responses:
'204':
"$ref": "../../responses.yaml#/204"
Expand All @@ -46,6 +31,26 @@ x-code-samples:
--project_id <project_id> \
--id <id> \
--branch my-feature-branch \
--translation_key_ids "abcd1234cdef1234abcd1234cdef1234" \
--data '{"branch": "my-feature-branch", "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
--access_token <token>
x-cli-version: '2.5'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/keys/delete/parameters
required:
- translation_key_ids
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
translation_key_ids:
description: ids of keys that should be deleted from the job
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234

0 comments on commit f670e27

Please sign in to comment.