2022-04-25 14:17:59 +02:00
|
|
|
import { createSchemaObject, CreateSchemaType } from '../types';
|
|
|
|
|
|
|
|
export const schema = {
|
|
|
|
type: 'object',
|
2022-04-29 08:09:27 +02:00
|
|
|
additionalProperties: false,
|
2022-04-25 14:17:59 +02:00
|
|
|
required: ['id', 'name', 'constraints', 'parameters'],
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
name: {
|
|
|
|
type: 'string',
|
|
|
|
},
|
|
|
|
constraints: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/constraintSchema',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
parameters: {
|
|
|
|
type: 'object',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type StrategySchema = CreateSchemaType<typeof schema>;
|
|
|
|
|
|
|
|
export const strategySchema = createSchemaObject(schema);
|