Skip to content

Commit 29bc6f6

Browse files
committed
feat(API): Add only_content_updates on translations versions
1 parent 93ab5d0 commit 29bc6f6

4 files changed

Lines changed: 26 additions & 12 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ You added an endpoint in Phrase Strings. In this project you do the following:
3232
2. Add new endpoints to `/paths/` directory and reference it in `paths.yaml`
3333
3. `npm start` to re-build the clients
3434
4. Open a PR with an informative title (e.g. `feat(API): Add an API endpoint for cat pics`)
35-
5. Merge automated documentation PR [(details)](#documentation-sync)
3635

3736
## Workflow
3837

@@ -64,9 +63,10 @@ This includes:
6463

6564
1. Pulling the most recent schema from this repository,
6665
2. Regenerating the documentation site,
67-
3. Deploying the updated docs.
66+
3. Merging the `developer-hub` PR,
67+
4. Deploying the updated docs.
6868

69-
The last step in bringing your changes live is to merge in the automatically generated PR to `developer-hub`. This requires `write` permissions, so look to see who has merged previous PRs for who to ping to get something merged.
69+
The generated PR in `developer-hub` will be automatically merged if tests passes. Please ensure that the changes got merged. Only then they will be live & visible on our public API documentation.
7070

7171
This setup ensures that the public API documentation always reflects the current OpenAPI spec.
7272

clients/cli/go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
215215
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
216216
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
217217
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
218-
github.com/phrase/phrase-go/v4 v4.18.1 h1:y1sv4z8ufEQB+kJA8ymSiH8nRAvH8gGoVSB5/7jvYEQ=
219-
github.com/phrase/phrase-go/v4 v4.18.1/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
220-
github.com/phrase/phrase-go/v4 v4.19.0 h1:tNliCxO/0SMu2viLE9idzADBUoY9C6CqrDmp3ntgpQI=
221-
github.com/phrase/phrase-go/v4 v4.19.0/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
218+
github.com/phrase/phrase-go/v4 v4.14.1 h1:ehFMnZI+NUWSDFCNhNot6Uk4e2EwCnyGLG3fEagVijk=
219+
github.com/phrase/phrase-go/v4 v4.14.1/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
222220
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
223221
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
224222
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

doc/compiled.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15288,6 +15288,15 @@
1528815288
"schema": {
1528915289
"type": "string"
1529015290
}
15291+
},
15292+
{
15293+
"description": "Indicates whether only content updates should be returned",
15294+
"example": true,
15295+
"name": "only_content_updates",
15296+
"in": "query",
15297+
"schema": {
15298+
"type": "boolean"
15299+
}
1529115300
}
1529215301
],
1529315302
"responses": {
@@ -15298,7 +15307,7 @@
1529815307
"schema": {
1529915308
"type": "array",
1530015309
"items": {
15301-
"$ref": "#/components/schemas/translation_version"
15310+
"$ref": "#/components/schemas/translation_version_with_user"
1530215311
}
1530315312
}
1530415313
}
@@ -15334,11 +15343,11 @@
1533415343
"x-code-samples": [
1533515344
{
1533615345
"lang": "Curl",
15337-
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
15346+
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch&only_content_updates=true\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
1533815347
},
1533915348
{
1534015349
"lang": "CLI v2",
15341-
"source": "phrase versions list \\\n--project_id <project_id> \\\n--translation_id <translation_id> \\\n--branch my-feature-branch \\\n--access_token <token>"
15350+
"source": "phrase versions list \\\n--project_id <project_id> \\\n--translation_id <translation_id> \\\n--branch my-feature-branch \\\n--only_content_updates true \\\n--access_token <token>"
1534215351
}
1534315352
],
1534415353
"x-cli-version": "2.5"

paths/versions/index.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ parameters:
1616
in: query
1717
schema:
1818
type: string
19+
- description: Indicates whether only content updates should be returned
20+
example: true
21+
name: only_content_updates
22+
in: query
23+
schema:
24+
type: boolean
1925
responses:
2026
'200':
2127
description: OK
@@ -24,7 +30,7 @@ responses:
2430
schema:
2531
type: array
2632
items:
27-
"$ref": "../../schemas/translation_version.yaml#/translation_version"
33+
"$ref": "../../schemas/translation_version_with_user.yaml#/translation_version_with_user"
2834
headers:
2935
X-Rate-Limit-Limit:
3036
"$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
@@ -45,13 +51,14 @@ responses:
4551
x-code-samples:
4652
- lang: Curl
4753
source: |-
48-
curl "https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch" \
54+
curl "https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch&only_content_updates=true" \
4955
-u USERNAME_OR_ACCESS_TOKEN
5056
- lang: CLI v2
5157
source: |-
5258
phrase versions list \
5359
--project_id <project_id> \
5460
--translation_id <translation_id> \
5561
--branch my-feature-branch \
62+
--only_content_updates true \
5663
--access_token <token>
5764
x-cli-version: '2.5'

0 commit comments

Comments
 (0)