Skip to content

Commit

Permalink
fix(API): Adjust documentation of QPS endpoint (#525)
Browse files Browse the repository at this point in the history
* fix: Adjust documentation for QPS

* chore: bump nodejs to LTS 20
  • Loading branch information
Varpuspaavi authored Feb 1, 2024
1 parent c2f1999 commit 4b4f1ac
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ doc/*.js
tmp/
node_modules/
.DS_Store
clients/cli/README.md
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
golang 1.19.1
nodejs 16.13.1
nodejs 20.11.0
maven 3.9.1
7 changes: 3 additions & 4 deletions clients/cli/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
Expand Down Expand Up @@ -218,8 +218,8 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
github.com/phrase/phrase-go/v2 v2.22.1 h1:cfDmcpuRoETD/1yY6GKEAcLdlVVb1+xHSkAqG8GiZZc=
github.com/phrase/phrase-go/v2 v2.22.1/go.mod h1:ARQGM+rzC0tPf3Lf4pHoRKpGtmQnBa7V7LSVs3oJf0U=
github.com/phrase/phrase-go/v2 v2.23.0 h1:kNgS70kWdadLMttkgXj8I7Npw7xkRX7AWFkch/GBzqY=
github.com/phrase/phrase-go/v2 v2.23.0/go.mod h1:ARQGM+rzC0tPf3Lf4pHoRKpGtmQnBa7V7LSVs3oJf0U=
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/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
Expand Down Expand Up @@ -472,7 +472,6 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
Expand Down
14 changes: 7 additions & 7 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -21337,10 +21337,10 @@
"x-cli-version": "2.5"
}
},
"/projects/{id}/quality_performance_score": {
"/projects/{project_id}/quality_performance_score": {
"post": {
"summary": "Get project's translations' quality performance scores",
"description": "Get project's translations' quality performance scores",
"summary": "Get Translation Quality",
"description": "Retrieves the quality scores for your Strings translations. Returns a score, measured by Phrase QPS",
"operationId": "projects/quality_performance_score",
"tags": [
"Quality performance score"
Expand All @@ -21350,7 +21350,7 @@
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/id"
"$ref": "#/components/parameters/project_id"
}
],
"responses": {
Expand Down Expand Up @@ -21408,7 +21408,7 @@
},
"errors": {
"type": "array",
"description": "Array of errors for any failing translation ids",
"description": "Array of errors for any failing translation IDs",
"items": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -21482,11 +21482,11 @@
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/projects/:id/quality_performance_score\" \\\n -X POST \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -d '{\"translation_ids\":[\"translation_id_1\", \"translation_id_2\"]}' \\\n -H 'Content-Type: application/json'"
"source": "curl \"https://api.phrase.com/v2/projects/:project_id/quality_performance_score\" \\\n -X POST \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -d '{\"translation_ids\":[\"translation_id_1\", \"translation_id_2\"]}' \\\n -H 'Content-Type: application/json'"
},
{
"lang": "CLI v2",
"source": "phrase projects quality_performance_score \\\n--id <id> \\\n--data '{\"translation_ids\":[\"translation_id_1\", \"translation_id_2\"]}' \\\n--access_token <token>"
"source": "phrase projects quality_performance_score \\\n--project_id <project_id> \\\n--data '{\"translation_ids\":[\"translation_id_1\", \"translation_id_2\"]}' \\\n--access_token <token>"
}
],
"requestBody": {
Expand Down
2 changes: 1 addition & 1 deletion paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
"/projects/{project_id}/orders/{id}/confirm":
patch:
"$ref": "./paths/orders/confirm.yaml"
"/projects/{id}/quality_performance_score":
"/projects/{project_id}/quality_performance_score":
post:
"$ref": "./paths/quality_performance_score/index.yaml"
"/accounts/{account_id}/spaces":
Expand Down
10 changes: 5 additions & 5 deletions paths/quality_performance_score/index.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
summary: Get project's translations' quality performance scores
description: Get project's translations' quality performance scores
summary: Get Translation Quality
description: Retrieves the quality scores for your Strings translations. Returns a score, measured by Phrase QPS
operationId: projects/quality_performance_score
tags:
- Quality performance score
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/id"
- "$ref": "../../parameters.yaml#/project_id"
responses:
'200':
description: OK
Expand Down Expand Up @@ -36,15 +36,15 @@ responses:
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:id/quality_performance_score" \
curl "https://api.phrase.com/v2/projects/:project_id/quality_performance_score" \
-X POST \
-u USERNAME_OR_ACCESS_TOKEN \
-d '{"translation_ids":["translation_id_1", "translation_id_2"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase projects quality_performance_score \
--id <id> \
--project_id <project_id> \
--data '{"translation_ids":["translation_id_1", "translation_id_2"]}' \
--access_token <token>
requestBody:
Expand Down
2 changes: 1 addition & 1 deletion schemas/quality_performance_score.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ quality_performance_score:
description: One of the translation ids passed in arguments
errors:
type: array
description: Array of errors for any failing translation ids
description: Array of errors for any failing translation IDs
items:
type: object
properties:
Expand Down

0 comments on commit 4b4f1ac

Please sign in to comment.