Files
unleash/src/lib/openapi/spec/patch-schema.ts
T
olav 13ef025fab refactor: add soft response schema validation (#1657)
* 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
2022-06-08 08:01:14 +02:00

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>;