mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
18 lines
826 B
TypeScript
18 lines
826 B
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
import { createStrategyVariantSchema } from './create-strategy-variant-schema';
|
|
|
|
export const strategyVariantSchema = {
|
|
$id: '#/components/schemas/strategyVariantSchema',
|
|
type: 'object',
|
|
additionalProperties: false,
|
|
description:
|
|
"This is an experimental property. It may change or be removed as we work on it. Please don't depend on it yet. A strategy variant allows you to attach any data to strategies instead of only returning `true`/`false`. Strategy variants take precedence over feature variants.",
|
|
required: ['name', 'weight', 'weightType', 'stickiness'],
|
|
properties: {
|
|
...createStrategyVariantSchema.properties,
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type StrategyVariantSchema = FromSchema<typeof strategyVariantSchema>;
|