mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
013efac46b
We love all open-source Unleash users. in 2022 we built the [segment capability](https://docs.getunleash.io/reference/segments) (v4.13) as an enterprise feature, simplify life for our customers. Now it is time to contribute it to the world 🌏 --------- Co-authored-by: Thomas Heartman <thomas@getunleash.io>
58 lines
2.0 KiB
TypeScript
58 lines
2.0 KiB
TypeScript
import { FromSchema } from 'json-schema-to-ts';
|
|
|
|
export const contextFieldStrategiesSchema = {
|
|
$id: '#/components/schemas/contextFieldStrategiesSchema',
|
|
type: 'object',
|
|
description:
|
|
'A wrapper object containing all strategies that use a specific context field',
|
|
required: ['strategies'],
|
|
properties: {
|
|
strategies: {
|
|
type: 'array',
|
|
description: 'List of strategies using the context field',
|
|
items: {
|
|
type: 'object',
|
|
required: [
|
|
'id',
|
|
'featureName',
|
|
'projectId',
|
|
'environment',
|
|
'strategyName',
|
|
],
|
|
properties: {
|
|
id: {
|
|
type: 'string',
|
|
example: '433ae8d9-dd69-4ad0-bc46-414aedbe9c55',
|
|
description: 'The ID of the strategy.',
|
|
},
|
|
featureName: {
|
|
type: 'string',
|
|
example: 'best-feature',
|
|
description:
|
|
'The name of the feature that contains this strategy.',
|
|
},
|
|
projectId: {
|
|
type: 'string',
|
|
description:
|
|
'The ID of the project that contains this feature.',
|
|
},
|
|
environment: {
|
|
type: 'string',
|
|
description:
|
|
'The ID of the environment where this strategy is in.',
|
|
},
|
|
strategyName: {
|
|
type: 'string',
|
|
description: 'The name of the strategy.',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: {},
|
|
} as const;
|
|
|
|
export type ContextFieldStrategiesSchema = FromSchema<
|
|
typeof contextFieldStrategiesSchema
|
|
>;
|