Skip to content

Commit 39e4943

Browse files
committed
Move to requestBody
1 parent 714f3e6 commit 39e4943

3 files changed

Lines changed: 34 additions & 25 deletions

File tree

doc/compiled.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4961,16 +4961,6 @@
49614961
},
49624962
"example": "my-feature-branch"
49634963
},
4964-
"pr_branch": {
4965-
"name": "pr_branch",
4966-
"in": "query",
4967-
"description": "Source branch to open a pull request from",
4968-
"required": false,
4969-
"schema": {
4970-
"type": "string"
4971-
},
4972-
"example": "my-feature-branch"
4973-
},
49744964
"page": {
49754965
"in": "query",
49764966
"name": "page",
@@ -22901,11 +22891,26 @@
2290122891
},
2290222892
{
2290322893
"$ref": "#/components/parameters/id"
22904-
},
22905-
{
22906-
"$ref": "#/components/parameters/pr_branch"
2290722894
}
2290822895
],
22896+
"requestBody": {
22897+
"required": false,
22898+
"content": {
22899+
"application/json": {
22900+
"schema": {
22901+
"type": "object",
22902+
"title": "repo_sync/export/parameters",
22903+
"properties": {
22904+
"pr_branch": {
22905+
"description": "Source branch to open a pull request from",
22906+
"type": "string",
22907+
"example": "my-feature-branch"
22908+
}
22909+
}
22910+
}
22911+
}
22912+
}
22913+
},
2290922914
"responses": {
2291022915
"200": {
2291122916
"description": "OK",
@@ -22941,7 +22946,7 @@
2294122946
"x-code-samples": [
2294222947
{
2294322948
"lang": "Curl",
22944-
"source": "curl \"https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export?pr_branch=my-feature-branch\"\\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -H 'Content-Type: application/json'"
22949+
"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\"}'"
2294522950
},
2294622951
{
2294722952
"lang": "CLI v2",

parameters.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,6 @@ branch:
214214
schema:
215215
type: string
216216
example: my-feature-branch
217-
pr_branch:
218-
name: pr_branch
219-
in: query
220-
description: Source branch to open a pull request from
221-
required: false
222-
schema:
223-
type: string
224-
example: my-feature-branch
225217
page:
226218
in: query
227219
name: page

paths/repo_syncs/export.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ parameters:
1212
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
1313
- "$ref": "../../parameters.yaml#/account_id"
1414
- "$ref": "../../parameters.yaml#/id"
15-
- "$ref": "../../parameters.yaml#/pr_branch"
15+
requestBody:
16+
required: false
17+
content:
18+
application/json:
19+
schema:
20+
type: object
21+
title: repo_sync/export/parameters
22+
properties:
23+
pr_branch:
24+
description: Source branch to open a pull request from
25+
type: string
26+
example: my-feature-branch
1627
responses:
1728
'200':
1829
description: OK
@@ -36,10 +47,11 @@ responses:
3647
x-code-samples:
3748
- lang: Curl
3849
source: |-
39-
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export?pr_branch=my-feature-branch"\
50+
curl "https://api.phrase.com/v2/accounts/ab12cd34/repo_syncs/45ef6789/export" \
4051
-u USERNAME_OR_ACCESS_TOKEN \
4152
-X POST \
42-
-H 'Content-Type: application/json'
53+
-H 'Content-Type: application/json' \
54+
-d '{"pr_branch":"my-feature-branch"}'
4355
- lang: CLI v2
4456
source: |-
4557
phrase repo_syncs export \

0 commit comments

Comments
 (0)