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
16 changes: 13 additions & 3 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -15288,6 +15288,16 @@
"schema": {
"type": "string"
}
},
{
"description": "Indicates whether only content updates should be returned",
"example": true,
"name": "only_content_updates",
"in": "query",
"schema": {
"type": "boolean",
"default": false
}
}
],
"responses": {
Expand All @@ -15298,7 +15308,7 @@
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/translation_version"
"$ref": "#/components/schemas/translation_version_with_user"
}
}
}
Expand Down Expand Up @@ -15334,11 +15344,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
12 changes: 10 additions & 2 deletions paths/versions/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ parameters:
in: query
schema:
type: string
- description: Indicates whether only content updates should be returned
example: true
name: only_content_updates
in: query
schema:
type: boolean
default: false
responses:
'200':
description: OK
Expand All @@ -24,7 +31,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 +52,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