From 2d9963fbd8089e2335ecac325ed7ba7c8886a345 Mon Sep 17 00:00:00 2001 From: Rish Date: Thu, 17 Oct 2019 12:22:50 +0530 Subject: [PATCH] Allowed `comment_id` and `uuid` in post API input refs https://github.com/TryGhost/Ghost/pull/11462 Allows `comment_id` and `uuid` to be passed in post `add`/`edit` API calls instead of failing requests with validation error, though both properties are stripped out in serializer as we don't allow editing them. --- .../api/canary/utils/validators/input/schemas/posts.json | 6 ++++++ .../server/api/v2/utils/validators/input/schemas/posts.json | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/core/server/api/canary/utils/validators/input/schemas/posts.json b/core/server/api/canary/utils/validators/input/schemas/posts.json index 4c0a71143c..58145ccfda 100644 --- a/core/server/api/canary/utils/validators/input/schemas/posts.json +++ b/core/server/api/canary/utils/validators/input/schemas/posts.json @@ -121,6 +121,12 @@ "id": { "strip": true }, + "uuid": { + "strip": true + }, + "comment_id": { + "strip": true + }, "author": { "strip": true }, diff --git a/core/server/api/v2/utils/validators/input/schemas/posts.json b/core/server/api/v2/utils/validators/input/schemas/posts.json index 5e89d37ade..30047da93c 100644 --- a/core/server/api/v2/utils/validators/input/schemas/posts.json +++ b/core/server/api/v2/utils/validators/input/schemas/posts.json @@ -117,6 +117,12 @@ "id": { "strip": true }, + "uuid": { + "strip": true + }, + "comment_id": { + "strip": true + }, "author": { "strip": true },