mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
25 lines
580 B
TypeScript
25 lines
580 B
TypeScript
|
import { createSchemaObject, CreateSchemaType } from '../types';
|
||
|
|
||
|
const schema = {
|
||
|
type: 'object',
|
||
|
required: ['path', 'op'],
|
||
|
properties: {
|
||
|
path: {
|
||
|
type: 'string',
|
||
|
},
|
||
|
op: {
|
||
|
type: 'string',
|
||
|
enum: ['add', 'remove', 'replace', 'copy', 'move'],
|
||
|
},
|
||
|
from: {
|
||
|
type: 'string',
|
||
|
},
|
||
|
value: {},
|
||
|
},
|
||
|
'components/schemas': {},
|
||
|
} as const;
|
||
|
|
||
|
export type PatchOperationSchema = CreateSchemaType<typeof schema>;
|
||
|
|
||
|
export const patchOperationSchema = createSchemaObject(schema);
|