Skip to content
Open
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ You added an endpoint in Phrase Strings. In this project you do the following:
2. Add new endpoints to `/paths/` directory and reference it in `paths.yaml`
3. `npm start` to re-build the clients
4. Open a PR with an informative title (e.g. `feat(API): Add an API endpoint for cat pics`)
5. Merge automated documentation PR [(details)](#documentation-sync)

## Workflow

Expand Down Expand Up @@ -64,9 +63,10 @@ This includes:

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

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.
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.

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

Expand Down
4 changes: 2 additions & 2 deletions clients/cli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/phrase/phrase-go/v4 v4.9.0 h1:V+MWmNrxwrYNtmoY41dgrdWT902Er2hcohtQcpVvWmw=
github.com/phrase/phrase-go/v4 v4.9.0/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
github.com/phrase/phrase-go/v4 v4.14.1 h1:ehFMnZI+NUWSDFCNhNot6Uk4e2EwCnyGLG3fEagVijk=
github.com/phrase/phrase-go/v4 v4.14.1/go.mod h1:4XplKvrbHS2LDaXfFp9xrVDtO5xk2WHFm0htutwwd8c=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
15 changes: 12 additions & 3 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -15056,6 +15056,15 @@
"schema": {
"type": "string"
}
},
{
"description": "Indicates whether only content updates should be returned",
"example": true,
"name": "only_content_updates",
"in": "query",
"schema": {
"type": "boolean"
}
}
],
"responses": {
Expand All @@ -15066,7 +15075,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/translation_version"
"$ref": "#/components/schemas/translation_version_with_user"
}
}
}
Expand Down Expand Up @@ -15102,11 +15111,11 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch\" \\\n -u USERNAME_OR_ACCESS_TOKEN"
"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"
},
{
"lang": "CLI v2",
"source": "phrase versions list \\\n--project_id <project_id> \\\n--translation_id <translation_id> \\\n--branch my-feature-branch \\\n--access_token <token>"
"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>"
}
],
"x-cli-version": "2.5"
Expand Down
11 changes: 9 additions & 2 deletions paths/versions/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ parameters:
in: query
schema:
type: string
- description: Indicates whether only content updates should be returned
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably specify the default here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jablan I tried to keep it consistent to other places and the ones I found did not mention the default. I would also say default can be assumed to be false if not mentioned elsewise, wdyt?

example: true
name: only_content_updates
in: query
schema:
type: boolean
responses:
'200':
description: OK
Expand All @@ -24,7 +30,7 @@ responses:
schema:
type: array
items:
"$ref": "../../schemas/translation_version.yaml#/translation_version"
"$ref": "../../schemas/translation_version_with_user.yaml#/translation_version_with_user"
headers:
X-Rate-Limit-Limit:
"$ref": "../../headers.yaml#/X-Rate-Limit-Limit"
Expand All @@ -45,13 +51,14 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch" \
curl "https://api.phrase.com/v2/projects/:project_id/translations/:translation_id/versions?branch=my-feature-branch&only_content_updates=true" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase versions list \
--project_id <project_id> \
--translation_id <translation_id> \
--branch my-feature-branch \
--only_content_updates true \
--access_token <token>
x-cli-version: '2.5'
Loading