import { createSchemaObject, CreateSchemaType } from '../types'; import { parametersSchema } from './parameters-schema'; import { constraintSchema } from './constraint-schema'; const schema = { type: 'object', additionalProperties: false, required: ['name'], properties: { name: { type: 'string', }, sortOrder: { type: 'number', }, constraints: { type: 'array', items: { $ref: '#/components/schemas/constraintSchema', }, }, parameters: { $ref: '#/components/schemas/parametersSchema', }, }, 'components/schemas': { constraintSchema, parametersSchema, }, } as const; export type CreateStrategySchema = CreateSchemaType; export const createStrategySchema = createSchemaObject(schema);