mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
28 lines
657 B
TypeScript
28 lines
657 B
TypeScript
|
import { createSchemaObject, CreateSchemaType } from '../types';
|
||
|
|
||
|
export const schema = {
|
||
|
type: 'object',
|
||
|
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);
|