From b63593aa8b9a9684576029cf36a0f0e076f6bf96 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 3 Oct 2020 12:49:50 +0200 Subject: [PATCH] Public API: Simplify PUT /me/history/{note} Previously, one had to send a complete `NoteMetadata` object when updating the pinned status of a note. A new `HistoryUpdateObject` type was introduced, that only contains the pinned status boolean. Signed-off-by: David Mehren Co-authored-by: Yannick Bungers --- docs/dev/public_api.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/dev/public_api.yml b/docs/dev/public_api.yml index 987aceef3..6e35f9bdd 100644 --- a/docs/dev/public_api.yml +++ b/docs/dev/public_api.yml @@ -88,7 +88,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/HistoryObject" + "$ref": "#/components/schemas/HistoryUpdateObject" responses: '200': description: The new history. @@ -908,6 +908,12 @@ components: pinned: type: boolean description: Whether the user has pinned this note. + HistoryUpdateObject: + type: object + properties: + pinned: + type: boolean + description: Whether the user has pinned this note. History: type: object properties: