diff --git a/doc/compiled.json b/doc/compiled.json index afba5090..a73ac25a 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -5684,7 +5684,7 @@ "/projects/{project_id}/documents/{id}": { "delete": { "summary": "Delete document", - "description": "Delete an existing document.", + "description": "Permanently deletes a document and all of its associated translation segments from the project. Use this when you want to remove a document that is no longer needed; the deletion cannot be reversed and all associated segments will be lost.\n", "operationId": "document/delete", "tags": [ "Documents" @@ -5711,8 +5711,7 @@ "$ref": "#/components/responses/401" }, "403": { - "$ref": "#/components/responses/403", - "description": "Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to delete this document." + "$ref": "#/components/responses/403" }, "404": { "$ref": "#/components/responses/404" @@ -5724,16 +5723,6 @@ "$ref": "#/components/responses/429" } }, - "x-code-samples": [ - { - "lang": "Curl", - "source": "curl \"https://api.phrase.com/v2/projects/:project_id/documents/:id\" \\\n -u USERNAME_OR_ACCESS_TOKEN \\\n -X DELETE \\\n -H 'Content-Type: application/json'" - }, - { - "lang": "CLI v2", - "source": "phrase documents delete \\\n--project_id \\\n--id \\\n--access_token " - } - ], "x-cli-version": "2.5" } }, diff --git a/paths/documents/destroy.yaml b/paths/documents/destroy.yaml index bcae3e6e..f785e3d4 100644 --- a/paths/documents/destroy.yaml +++ b/paths/documents/destroy.yaml @@ -1,6 +1,7 @@ --- summary: Delete document -description: Delete an existing document. +description: | + Permanently deletes a document and all of its associated translation segments from the project. Use this when you want to remove a document that is no longer needed; the deletion cannot be reversed and all associated segments will be lost. operationId: document/delete tags: - Documents @@ -13,28 +14,14 @@ responses: "$ref": "../../responses.yaml#/200" '400': "$ref": "../../responses.yaml#/400" - '404': - "$ref": "../../responses.yaml#/404" '401': "$ref": "../../responses.yaml#/401" '403': "$ref": "../../responses.yaml#/403" - description: Forbidden. Returned when the access token lacks the `write` scope or when the requesting user is not allowed to delete this document. + '404': + "$ref": "../../responses.yaml#/404" '422': "$ref": "../../responses.yaml#/422" '429': "$ref": "../../responses.yaml#/429" -x-code-samples: -- lang: Curl - source: |- - curl "https://api.phrase.com/v2/projects/:project_id/documents/:id" \ - -u USERNAME_OR_ACCESS_TOKEN \ - -X DELETE \ - -H 'Content-Type: application/json' -- lang: CLI v2 - source: |- - phrase documents delete \ - --project_id \ - --id \ - --access_token x-cli-version: '2.5'