mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Add feature name to strategy schema (#2936)
This commit is contained in:
		
							parent
							
								
									f4d857285b
								
							
						
					
					
						commit
						53c11b8585
					
				@ -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;
 | 
			
		||||
 | 
			
		||||
@ -12,6 +12,9 @@ export const featureEnvironmentSchema = {
 | 
			
		||||
        name: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
        },
 | 
			
		||||
        featureName: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
        },
 | 
			
		||||
        environment: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,9 @@ export const featureStrategySchema = {
 | 
			
		||||
        name: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
        },
 | 
			
		||||
        featureName: {
 | 
			
		||||
            type: 'string',
 | 
			
		||||
        },
 | 
			
		||||
        sortOrder: {
 | 
			
		||||
            type: 'number',
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
@ -21,6 +21,7 @@ export enum WeightType {
 | 
			
		||||
export interface IStrategyConfig {
 | 
			
		||||
    id?: string;
 | 
			
		||||
    name: string;
 | 
			
		||||
    featureName?: string;
 | 
			
		||||
    constraints?: IConstraint[];
 | 
			
		||||
    segments?: number[];
 | 
			
		||||
    parameters?: { [key: string]: string };
 | 
			
		||||
 | 
			
		||||
@ -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",
 | 
			
		||||
          },
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user