1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-17 13:46:47 +02:00
unleash.unleash/src/lib/openapi/spec/strategies-schema.ts
Christopher Kolstad 53354224fc
chore: Bump biome and configure husky (#6589)
Upgrades biome to 1.6.1, and updates husky pre-commit hook.

Most changes here are making type imports explicit.
2024-03-18 13:58:05 +01:00

33 lines
883 B
TypeScript

import type { 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'],
description: 'List of strategies',
properties: {
version: {
type: 'integer',
enum: [1],
example: 1,
description: 'Version of the strategies schema',
},
strategies: {
type: 'array',
items: {
$ref: '#/components/schemas/strategySchema',
},
description: 'List of strategies',
},
},
components: {
schemas: {
strategySchema,
},
},
} as const;
export type StrategiesSchema = FromSchema<typeof strategiesSchema>;