From ce5ef1ab6e98c2c8e91735beab5eb6ee9fec6ca5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 16 May 2025 10:04:39 -0400 Subject: [PATCH] fix: openapi schema to handle additional `attachments` field in postsobject --- public/openapi/components/schemas/PostsObject.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/public/openapi/components/schemas/PostsObject.yaml b/public/openapi/components/schemas/PostsObject.yaml index b43d965888..5a079a08d9 100644 --- a/public/openapi/components/schemas/PostsObject.yaml +++ b/public/openapi/components/schemas/PostsObject.yaml @@ -2,4 +2,15 @@ PostsObject: description: One of the objects in the array returned from `Posts.getPostSummaryByPids` type: array items: - $ref: ./PostObject.yaml#/PostObject \ No newline at end of file + allOf: + - $ref: ./PostObject.yaml#/PostObject + - type: object + description: Optional properties that may or may not be present (except for `pid`, which is always present, and is only here as a hack to pass validation) + properties: + pid: + type: number + description: A post identifier + attachments: + type: array + required: + - pid \ No newline at end of file