1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

#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.
This commit is contained in:
Thomas Heartman 2022-09-14 12:33:57 +02:00
parent 6c107344aa
commit 0dd5d0faa1

View File

@ -15,7 +15,14 @@ export const patchSchema = {
from: {
type: 'string',
},
value: {},
value: {
oneOf: [
{
type: 'object',
},
{ type: 'array', items: { type: 'object' } },
],
},
},
components: {},
} as const;