Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 34 additions & 29 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -22910,6 +22910,11 @@
"description": "Source branch to open a pull request from",
"type": "string",
"example": "my-feature-branch"
},
"branch": {
"description": "Strings branch to export from",
"type": "string",
"example": "my-strings-branch"
}
}
}
Expand Down Expand Up @@ -22951,14 +22956,13 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json' \\\n -d '{\"pr_branch\":\"my-feature-branch\"}'"
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json' \\\n -d '{\"pr_branch\":\"my-feature-branch\", \"branch\":\"my-strings-branch\"}'"
},
{
"lang": "CLI v2",
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--pr_branch my-feature-branch \\\n--access_token <token>"
"source": "phrase repo_syncs export \\\n--id <repo_sync_id> \\\n--data '{\"pr_branch\":\"my-feature-branch\", \"branch\":\"my-strings-branch\"}' \\\n--access_token <token>"
}
],
"x-cli-version": "2.24"
]
}
},
"/accounts/{account_id}/repo_syncs/{id}/import": {
Expand All @@ -22978,11 +22982,31 @@
},
{
"$ref": "#/components/parameters/id"
},
{
"$ref": "#/components/parameters/branch"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "repo_sync/import/parameters",
"properties": {
"repository_branch": {
"description": "Branch to import from",
"type": "string",
"example": "my-feature-branch"
},
"branch": {
"description": "Strings branch to import to",
"type": "string",
"example": "my-strings-branch"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
Expand Down Expand Up @@ -23018,32 +23042,13 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/import\"\\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"repository_branch\":\"my-feature-branch\"}' \\\n -H 'Content-Type: application/json'"
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/import\"\\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"repository_branch\":\"my-feature-branch\", \"branch\":\"my-strings-branch\"}' \\\n -H 'Content-Type: application/json'"
},
{
"lang": "CLI v2",
"source": "phrase repo_syncs import \\\n--id <repo_sync_id> \\\n--data '{\"repository_branch\":\"my-feature-branch\"}' \\\n--access_token <token>"
"source": "phrase repo_syncs import \\\n--id <repo_sync_id> \\\n--data '{\"repository_branch\":\"my-feature-branch\", \"branch\":\"my-strings-branch\"}' \\\n--access_token <token>"
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "repo_sync/import/parameters",
"properties": {
"repository_branch": {
"description": "Branch to import from",
"type": "string",
"example": "my-feature-branch"
}
}
}
}
}
},
"x-cli-version": "2.24"
]
}
},
"/accounts/{account_id}/repo_syncs/{id}/events": {
Expand Down
9 changes: 6 additions & 3 deletions paths/repo_syncs/export.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ requestBody:
description: Source branch to open a pull request from
type: string
example: my-feature-branch
branch:
description: Strings branch to export from
type: string
example: my-strings-branch
responses:
'200':
description: OK
Expand Down Expand Up @@ -51,11 +55,10 @@ x-code-samples:
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-H 'Content-Type: application/json' \
-d '{"pr_branch":"my-feature-branch"}'
-d '{"pr_branch":"my-feature-branch", "branch":"my-strings-branch"}'
- lang: CLI v2
source: |-
phrase repo_syncs export \
--id <repo_sync_id> \
--pr_branch my-feature-branch \
--data '{"pr_branch":"my-feature-branch", "branch":"my-strings-branch"}' \
--access_token <token>
x-cli-version: '2.24'
34 changes: 18 additions & 16 deletions paths/repo_syncs/import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,22 @@ parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/id"
- "$ref": "../../parameters.yaml#/branch"
requestBody:
required: false
content:
application/json:
schema:
type: object
title: repo_sync/import/parameters
properties:
repository_branch:
description: Branch to import from
type: string
example: my-feature-branch
branch:
description: Strings branch to import to
type: string
example: my-strings-branch
responses:
'200':
description: OK
Expand All @@ -39,24 +54,11 @@ x-code-samples:
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/import"\
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"repository_branch":"my-feature-branch"}' \
-d '{"repository_branch":"my-feature-branch", "branch":"my-strings-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase repo_syncs import \
--id <repo_sync_id> \
--data '{"repository_branch":"my-feature-branch"}' \
--data '{"repository_branch":"my-feature-branch", "branch":"my-strings-branch"}' \
--access_token <token>
requestBody:
required: false
content:
application/json:
schema:
type: object
title: repo_sync/import/parameters
properties:
repository_branch:
description: Branch to import from
type: string
example: my-feature-branch
x-cli-version: '2.24'
Loading