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
42 lines
1.0 KiB
TypeScript
42 lines
1.0 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const upsertStrategySchema = {
|
|
$id: '#/components/schemas/upsertStrategySchema',
|
|
type: 'object',
|
|
required: ['name'],
|
|
properties: {
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
description: {
|
|
type: 'string',
|
|
},
|
|
editable: {
|
|
type: 'boolean',
|
|
},
|
|
parameters: {
|
|
type: 'array',
|
|
items: {
|
|
type: 'object',
|
|
properties: {
|
|
name: {
|
|
type: 'string',
|
|
},
|
|
type: {
|
|
type: 'string',
|
|
},
|
|
description: {
|
|
type: 'string',
|
|
},
|
|
required: {
|
|
type: 'boolean',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type UpsertStrategySchema = FromSchema<typeof upsertStrategySchema>;
|