mirror of
https://github.com/Unleash/unleash.git
synced 2024-11-01 19:07:38 +01:00
ac3f076a31
* refactor: avoid duplicate feature strategy operationIds * refactor: fix flaky feature tests * refactor: remove duplicate controller error handling * refactor: unify feature strategy schemas * refactor: add schemas to strategy controller
28 lines
684 B
TypeScript
28 lines
684 B
TypeScript
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'],
|
|
properties: {
|
|
version: {
|
|
type: 'integer',
|
|
},
|
|
strategies: {
|
|
type: 'array',
|
|
items: {
|
|
$ref: '#/components/schemas/strategySchema',
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
schemas: {
|
|
strategySchema,
|
|
},
|
|
},
|
|
} as const;
|
|
|
|
export type StrategiesSchema = FromSchema<typeof strategiesSchema>;
|