|
5021 | 5021 | } |
5022 | 5022 | } |
5023 | 5023 | }, |
| 5024 | + "202": { |
| 5025 | + "description": "Accepted", |
| 5026 | + "headers": { |
| 5027 | + "X-Rate-Limit-Limit": { |
| 5028 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 5029 | + }, |
| 5030 | + "X-Rate-Limit-Remaining": { |
| 5031 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 5032 | + }, |
| 5033 | + "X-Rate-Limit-Reset": { |
| 5034 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 5035 | + } |
| 5036 | + } |
| 5037 | + }, |
5024 | 5038 | "204": { |
5025 | 5039 | "description": "The resource was deleted successfully.", |
5026 | 5040 | "headers": { |
|
5080 | 5094 | } |
5081 | 5095 | } |
5082 | 5096 | }, |
| 5097 | + "409": { |
| 5098 | + "description": "Conflict", |
| 5099 | + "headers": { |
| 5100 | + "X-Rate-Limit-Limit": { |
| 5101 | + "$ref": "#/components/headers/X-Rate-Limit-Limit" |
| 5102 | + }, |
| 5103 | + "X-Rate-Limit-Remaining": { |
| 5104 | + "$ref": "#/components/headers/X-Rate-Limit-Remaining" |
| 5105 | + }, |
| 5106 | + "X-Rate-Limit-Reset": { |
| 5107 | + "$ref": "#/components/headers/X-Rate-Limit-Reset" |
| 5108 | + } |
| 5109 | + } |
| 5110 | + }, |
5083 | 5111 | "422": { |
5084 | 5112 | "description": "Unprocessable entity", |
5085 | 5113 | "content": { |
|
18508 | 18536 | "/projects/{project_id}/branches/{name}/compare": { |
18509 | 18537 | "get": { |
18510 | 18538 | "summary": "Compare branches", |
18511 | | - "description": "Compare branch with main branch. \n\n*Note: Comparing a branch may take several minutes depending on the project size.*\n", |
| 18539 | + "description": "Compare branch with main branch.\n\n*Note: Comparing a branch may take several minutes depending on the project size. Consider using the `POST /compare` endpoint for creating comparison asynchronously.*\n", |
18512 | 18540 | "operationId": "branch/compare", |
18513 | 18541 | "tags": [ |
18514 | 18542 | "Branches" |
|
18554 | 18582 | "404": { |
18555 | 18583 | "$ref": "#/components/responses/404" |
18556 | 18584 | }, |
| 18585 | + "409": { |
| 18586 | + "$ref": "#/components/responses/409", |
| 18587 | + "description": "A comparison is already in progress for this branch." |
| 18588 | + }, |
18557 | 18589 | "429": { |
18558 | 18590 | "$ref": "#/components/responses/429" |
18559 | 18591 | } |
|
18569 | 18601 | } |
18570 | 18602 | ], |
18571 | 18603 | "x-cli-version": "2.5" |
| 18604 | + }, |
| 18605 | + "post": { |
| 18606 | + "summary": "Create comparison (async.)", |
| 18607 | + "description": "Create a branch comparison asynchronously.\n", |
| 18608 | + "operationId": "branch/create_comparison", |
| 18609 | + "tags": [ |
| 18610 | + "Branches" |
| 18611 | + ], |
| 18612 | + "parameters": [ |
| 18613 | + { |
| 18614 | + "$ref": "#/components/parameters/X-PhraseApp-OTP" |
| 18615 | + }, |
| 18616 | + { |
| 18617 | + "$ref": "#/components/parameters/project_id" |
| 18618 | + }, |
| 18619 | + { |
| 18620 | + "$ref": "#/components/parameters/name" |
| 18621 | + } |
| 18622 | + ], |
| 18623 | + "responses": { |
| 18624 | + "200": { |
| 18625 | + "$ref": "#/components/responses/200" |
| 18626 | + }, |
| 18627 | + "202": { |
| 18628 | + "$ref": "#/components/responses/202" |
| 18629 | + }, |
| 18630 | + "400": { |
| 18631 | + "$ref": "#/components/responses/400" |
| 18632 | + }, |
| 18633 | + "404": { |
| 18634 | + "$ref": "#/components/responses/404" |
| 18635 | + }, |
| 18636 | + "409": { |
| 18637 | + "$ref": "#/components/responses/409", |
| 18638 | + "description": "An asynchronous comparison is already in progress for this branch." |
| 18639 | + }, |
| 18640 | + "429": { |
| 18641 | + "$ref": "#/components/responses/429" |
| 18642 | + } |
| 18643 | + }, |
| 18644 | + "x-code-samples": [ |
| 18645 | + { |
| 18646 | + "lang": "Curl", |
| 18647 | + "source": "curl \"https://api.phrase.com/v2/projects/:project_id/branches/:name/compare\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X POST \\\n -d '{\"direction\":\"merge\"}' \\\n -H 'Content-Type: application/json'" |
| 18648 | + }, |
| 18649 | + { |
| 18650 | + "lang": "CLI v2", |
| 18651 | + "source": "phrase branches create_comparison \\\n--project_id <project_id> \\\n--name <name> \\\n--access_token <token>" |
| 18652 | + } |
| 18653 | + ], |
| 18654 | + "requestBody": { |
| 18655 | + "required": true, |
| 18656 | + "content": { |
| 18657 | + "application/json": { |
| 18658 | + "schema": { |
| 18659 | + "type": "object", |
| 18660 | + "title": "branch/create_comparison/parameters", |
| 18661 | + "properties": { |
| 18662 | + "direction": { |
| 18663 | + "description": "direction of comparison, possible values are sync or merge (only for v2 branches, currently in private beta )", |
| 18664 | + "type": "string", |
| 18665 | + "example": "merge", |
| 18666 | + "default": "merge" |
| 18667 | + } |
| 18668 | + } |
| 18669 | + } |
| 18670 | + } |
| 18671 | + } |
| 18672 | + } |
18572 | 18673 | } |
18573 | 18674 | }, |
18574 | 18675 | "/accounts": { |
|
0 commit comments