2022-06-23 08:10:20 +02:00
|
|
|
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
import { strategySchema } from './strategy-schema';
|
|
|
|
|
|
|
|
export const strategiesSchema = {
|
|
|
|
$id: '#/components/schemas/strategiesSchema',
|
|
|
|
type: 'object',
|
|
|
|
additionalProperties: false,
|
|
|
|
required: ['version', 'strategies'],
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'List of strategies',
|
2022-06-23 08:10:20 +02:00
|
|
|
properties: {
|
|
|
|
version: {
|
|
|
|
type: 'integer',
|
2023-07-04 14:21:09 +02:00
|
|
|
enum: [1],
|
|
|
|
example: 1,
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'Version of the strategies schema',
|
2022-06-23 08:10:20 +02:00
|
|
|
},
|
|
|
|
strategies: {
|
|
|
|
type: 'array',
|
|
|
|
items: {
|
|
|
|
$ref: '#/components/schemas/strategySchema',
|
|
|
|
},
|
2023-07-14 16:48:35 +02:00
|
|
|
description: 'List of strategies',
|
2022-06-23 08:10:20 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
schemas: {
|
|
|
|
strategySchema,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export type StrategiesSchema = FromSchema<typeof strategiesSchema>;
|