Skip to content

Commit

Permalink
fix: (API) Add mandatory params to linked keys endpoints (#564)
Browse files Browse the repository at this point in the history
* Add mandatory params to linked keys endpoints

* Fix comment: Remove account_id param
  • Loading branch information
BlumMichael authored Apr 4, 2024
1 parent cc60977 commit 08d9846
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 10 deletions.
4 changes: 2 additions & 2 deletions clients/cli/go.sum
Original file line number Diff line number Diff line change
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.24.0 h1:3UAbj1SQne4j0X5Wp0O6tsgxp5hvcJuzdSE3x2E52Qo=
github.com/phrase/phrase-go/v2 v2.24.0/go.mod h1:ARQGM+rzC0tPf3Lf4pHoRKpGtmQnBa7V7LSVs3oJf0U=
github.com/phrase/phrase-go/v2 v2.25.0 h1:LCiuHrvKxCv/ZYKW1csu/BfGt4ksZA+zF9ocb8mLxx8=
github.com/phrase/phrase-go/v2 v2.25.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
29 changes: 25 additions & 4 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -4386,6 +4386,15 @@
"type": "string"
}
},
"key_id_as_id": {
"in": "path",
"name": "id",
"description": "Parent Translation Key ID",
"required": true,
"schema": {
"type": "string"
}
},
"figma_attachment_id": {
"in": "path",
"name": "figma_attachment_id",
Expand Down Expand Up @@ -26636,7 +26645,10 @@
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
"$ref": "#/components/parameters/project_id"
},
{
"$ref": "#/components/parameters/key_id_as_id"
},
{
"in": "query",
Expand Down Expand Up @@ -26696,7 +26708,10 @@
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
"$ref": "#/components/parameters/project_id"
},
{
"$ref": "#/components/parameters/key_id_as_id"
}
],
"responses": {
Expand Down Expand Up @@ -26742,7 +26757,10 @@
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
"$ref": "#/components/parameters/project_id"
},
{
"$ref": "#/components/parameters/key_id_as_id"
}
],
"requestBody": {
Expand Down Expand Up @@ -26802,7 +26820,10 @@
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
"$ref": "#/components/parameters/project_id"
},
{
"$ref": "#/components/parameters/key_id_as_id"
},
{
"in": "path",
Expand Down
7 changes: 7 additions & 0 deletions parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ key_id:
required: true
schema:
type: string
key_id_as_id:
in: path
name: id
description: Parent Translation Key ID
required: true
schema:
type: string
figma_attachment_id:
in: path
name: figma_attachment_id
Expand Down
3 changes: 2 additions & 1 deletion paths/key_links/batch_destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ tags:
- Linked Keys
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/project_id"
- "$ref": "../../parameters.yaml#/key_id_as_id"
- in: query
name: unlink_parent
required: false
Expand Down
3 changes: 2 additions & 1 deletion paths/key_links/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ tags:
- Linked Keys
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/project_id"
- "$ref": "../../parameters.yaml#/key_id_as_id"
requestBody:
required: true
content:
Expand Down
3 changes: 2 additions & 1 deletion paths/key_links/destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ tags:
- Linked Keys
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/project_id"
- "$ref": "../../parameters.yaml#/key_id_as_id"
- in: path
name: child_key_id
required: true
Expand Down
3 changes: 2 additions & 1 deletion paths/key_links/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ tags:
- Linked Keys
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/project_id"
- "$ref": "../../parameters.yaml#/key_id_as_id"
responses:
'200':
description: OK
Expand Down

0 comments on commit 08d9846

Please sign in to comment.