mirror of
https://github.com/Unleash/unleash.git
synced 2026-10-13 16:01:52 +00:00
13ef025fab
* refactor: remove most schema refs * refactor: generalize request/response schemas * refactor: simplify schema date formats * refactor: add soft response schema validation * refactor: fix emptySchema definition * refactor: update json-schema-to-ts and use refs
24 lines
535 B
TypeScript
24 lines
535 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const patchSchema = {
|
|
$id: '#/components/schemas/patchSchema',
|
|
type: 'object',
|
|
required: ['path', 'op'],
|
|
properties: {
|
|
path: {
|
|
type: 'string',
|
|
},
|
|
op: {
|
|
type: 'string',
|
|
enum: ['add', 'remove', 'replace', 'copy', 'move'],
|
|
},
|
|
from: {
|
|
type: 'string',
|
|
},
|
|
value: {},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type PatchSchema = FromSchema<typeof patchSchema>;
|