1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

Add feature name to strategy schema (#2936)

This commit is contained in:
sjaanus 2023-01-19 15:17:36 +02:00 committed by GitHub
parent f4d857285b
commit 53c11b8585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 0 deletions

View File

@ -5,6 +5,12 @@ import { featureEnvironmentSchema } from './feature-environment-schema';
import { contextFieldSchema } from './context-field-schema';
import { featureTagSchema } from './feature-tag-schema';
import { segmentSchema } from './segment-schema';
import { parametersSchema } from './parameters-schema';
import { legalValueSchema } from './legal-value-schema';
import { variantSchema } from './variant-schema';
import { overrideSchema } from './override-schema';
import { variantsSchema } from './variants-schema';
import { constraintSchema } from './constraint-schema';
export const exportResultSchema = {
$id: '#/components/schemas/exportResultSchema',
@ -57,6 +63,12 @@ export const exportResultSchema = {
contextFieldSchema,
featureTagSchema,
segmentSchema,
variantsSchema,
variantSchema,
overrideSchema,
constraintSchema,
parametersSchema,
legalValueSchema,
},
},
} as const;

View File

@ -12,6 +12,9 @@ export const featureEnvironmentSchema = {
name: {
type: 'string',
},
featureName: {
type: 'string',
},
environment: {
type: 'string',
},

View File

@ -14,6 +14,9 @@ export const featureStrategySchema = {
name: {
type: 'string',
},
featureName: {
type: 'string',
},
sortOrder: {
type: 'number',
},

View File

@ -21,6 +21,7 @@ export enum WeightType {
export interface IStrategyConfig {
id?: string;
name: string;
featureName?: string;
constraints?: IConstraint[];
segments?: number[];
parameters?: { [key: string]: string };

View File

@ -1143,6 +1143,9 @@ exports[`should serve the OpenAPI spec 1`] = `
"environment": {
"type": "string",
},
"featureName": {
"type": "string",
},
"name": {
"type": "string",
},
@ -1285,6 +1288,9 @@ exports[`should serve the OpenAPI spec 1`] = `
},
"type": "array",
},
"featureName": {
"type": "string",
},
"id": {
"type": "string",
},