Skip to content

Commit

Permalink
feat: add delete CM property doc (#477)
Browse files Browse the repository at this point in the history
* add delete api doc for CM properties

* build docs
  • Loading branch information
anthonyshchang authored Dec 6, 2023
1 parent d4b469d commit fcd8cbe
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
47 changes: 47 additions & 0 deletions doc/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6087,6 +6087,9 @@
{
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
},
{
"$ref": "#/components/parameters/data_type"
},
Expand Down Expand Up @@ -6473,6 +6476,50 @@
}
],
"x-cli-version": "2.9"
},
"delete": {
"summary": "Destroy property",
"description": "Destroy a custom metadata property of an account.\n\nThis endpoint is only available to accounts with advanced plans or above.\n",
"operationId": "custom_metadata_properties/delete",
"tags": [
"Custom Metadata"
],
"parameters": [
{
"$ref": "#/components/parameters/X-PhraseApp-OTP"
},
{
"$ref": "#/components/parameters/account_id"
},
{
"$ref": "#/components/parameters/id"
}
],
"responses": {
"204": {
"$ref": "#/components/responses/204"
},
"400": {
"$ref": "#/components/responses/400"
},
"404": {
"$ref": "#/components/responses/404"
},
"429": {
"$ref": "#/components/responses/429"
}
},
"x-code-samples": [
{
"lang": "Curl",
"source": "curl \"https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN\n -X DELETE\n -H 'Content-Type: application/json'"
},
{
"lang": "CLI v2",
"source": "phrase custom_metadata_properties delete \\\n--account_id <account_id> \\\n--id <id> \\\n--access_token <token>"
}
],
"x-cli-version": "2.9"
}
},
"/accounts/{account_id}/invitations": {
Expand Down
2 changes: 2 additions & 0 deletions paths.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"$ref": "./paths/custom_metadata_properties/create.yaml"
patch:
"$ref": "./paths/custom_metadata_properties/update.yaml"
delete:
"$ref": "./paths/custom_metadata_properties/destroy.yaml"
"/accounts/{account_id}/invitations":
get:
"$ref": "./paths/invitations/index.yaml"
Expand Down
36 changes: 36 additions & 0 deletions paths/custom_metadata_properties/destroy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
summary: Destroy property
description: |
Destroy a custom metadata property of an account.
This endpoint is only available to accounts with advanced plans or above.
operationId: custom_metadata_properties/delete
tags:
- Custom Metadata
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/id"
responses:
'204':
"$ref": "../../responses.yaml#/204"
'400':
"$ref": "../../responses.yaml#/400"
'404':
"$ref": "../../responses.yaml#/404"
'429':
"$ref": "../../responses.yaml#/429"
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/labels/:id" \
-u USERNAME_OR_ACCESS_TOKEN
-X DELETE
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase custom_metadata_properties delete \
--account_id <account_id> \
--id <id> \
--access_token <token>
x-cli-version: '2.9'
1 change: 1 addition & 0 deletions paths/custom_metadata_properties/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ tags:
- Custom Metadata
parameters:
- "$ref": "../../parameters.yaml#/X-PhraseApp-OTP"
- "$ref": "../../parameters.yaml#/account_id"
- "$ref": "../../parameters.yaml#/data_type"
- description: id of project that the properties belong to
example:
Expand Down

0 comments on commit fcd8cbe

Please sign in to comment.