From 0dd5d0faa1554a394178c0f632915e096204cac7 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 14 Sep 2022 12:33:57 +0200 Subject: [PATCH] #1391: modify patch schema to specify either object or array We don't provide many patch endpoints, so we _could_ create separate patch operation objects for each one. I think that makes sense to do as part of the larger cleanup. For now, I think it's worth to simply turn it into one of these. While it's not entirely accurate, it's better than what we had before. --- src/lib/openapi/spec/patch-schema.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/openapi/spec/patch-schema.ts b/src/lib/openapi/spec/patch-schema.ts index c8ba1e99e3..062b415934 100644 --- a/src/lib/openapi/spec/patch-schema.ts +++ b/src/lib/openapi/spec/patch-schema.ts @@ -15,7 +15,14 @@ export const patchSchema = { from: { type: 'string', }, - value: {}, + value: { + oneOf: [ + { + type: 'object', + }, + { type: 'array', items: { type: 'object' } }, + ], + }, }, components: {}, } as const;