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

chore: rename toggle to flag #6 (#7122)

This commit is contained in:
Jaanus Sellin 2024-05-23 11:32:11 +03:00 committed by GitHub
parent 4824a02f2b
commit 7937301424
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
52 changed files with 140 additions and 145 deletions

View File

@ -279,9 +279,9 @@ test('should lookup projectId from params', async () => {
); );
}); });
test('should lookup projectId from feature toggle', async () => { test('should lookup projectId from feature flag', async () => {
const projectId = 'some-project-33'; const projectId = 'some-project-33';
const featureName = 'some-feature-toggle'; const featureName = 'some-feature-flag';
const accessService = { const accessService = {
hasPermission: jest.fn(), hasPermission: jest.fn(),
@ -320,7 +320,7 @@ test('should lookup projectId from feature toggle', async () => {
test('should lookup projectId from data', async () => { test('should lookup projectId from data', async () => {
const projectId = 'some-project-33'; const projectId = 'some-project-33';
const featureName = 'some-feature-toggle'; const featureName = 'some-feature-flag';
const accessService = { const accessService = {
hasPermission: jest.fn(), hasPermission: jest.fn(),
@ -357,9 +357,9 @@ test('should lookup projectId from data', async () => {
); );
}); });
test('Does not double check permission if not changing project when updating toggle', async () => { test('Does not double check permission if not changing project when updating flag', async () => {
const oldProjectId = 'some-project-34'; const oldProjectId = 'some-project-34';
const featureName = 'some-feature-toggle'; const featureName = 'some-feature-flag';
const accessService = { const accessService = {
hasPermission: jest.fn().mockReturnValue(true), hasPermission: jest.fn().mockReturnValue(true),
}; };

View File

@ -20,7 +20,7 @@ export const adminFeaturesQuerySchema = {
namePrefix: { namePrefix: {
type: 'string', type: 'string',
description: description:
'A case-insensitive prefix filter for the names of feature toggles', 'A case-insensitive prefix filter for the names of feature flags',
example: 'demo.part1', example: 'demo.part1',
}, },
}, },

View File

@ -14,7 +14,7 @@ import { sdkFlatContextSchema } from './sdk-flat-context-schema';
export const advancedPlaygroundEnvironmentFeatureSchema = { export const advancedPlaygroundEnvironmentFeatureSchema = {
$id: '#/components/schemas/advancedPlaygroundEnvironmentFeatureSchema', $id: '#/components/schemas/advancedPlaygroundEnvironmentFeatureSchema',
description: description:
'A simplified feature toggle model intended for the Unleash playground.', 'A simplified feature flag model intended for the Unleash playground.',
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: [ required: [
@ -40,7 +40,7 @@ export const advancedPlaygroundEnvironmentFeatureSchema = {
description: "The feature's environment.", description: "The feature's environment.",
}, },
context: { context: {
description: 'The context to use when evaluating toggles', description: 'The context to use when evaluating flags',
$ref: sdkFlatContextSchema.$id, $ref: sdkFlatContextSchema.$id,
}, },
projectId: { projectId: {
@ -102,7 +102,7 @@ export const advancedPlaygroundEnvironmentFeatureSchema = {
name: { name: {
type: 'string', type: 'string',
description: description:
"The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`", "The variant's name. If there is no variant or if the flag is disabled, this will be `disabled`",
example: 'red-variant', example: 'red-variant',
}, },
enabled: { enabled: {

View File

@ -12,7 +12,7 @@ import { sdkFlatContextSchema } from './sdk-flat-context-schema';
export const advancedPlaygroundFeatureSchema = { export const advancedPlaygroundFeatureSchema = {
$id: '#/components/schemas/advancedPlaygroundFeatureSchema', $id: '#/components/schemas/advancedPlaygroundFeatureSchema',
description: description:
'A simplified feature toggle model intended for the Unleash playground.', 'A simplified feature flag model intended for the Unleash playground.',
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: ['name', 'projectId', 'environments'], required: ['name', 'projectId', 'environments'],

View File

@ -3,7 +3,7 @@ import type { FromSchema } from 'json-schema-to-ts';
export const batchFeaturesSchema = { export const batchFeaturesSchema = {
$id: '#/components/schemas/batchFeaturesSchema', $id: '#/components/schemas/batchFeaturesSchema',
type: 'object', type: 'object',
description: 'A list of feature toggle names for batch operations', description: 'A list of feature flag names for batch operations',
required: ['features'], required: ['features'],
properties: { properties: {
features: { features: {
@ -11,7 +11,7 @@ export const batchFeaturesSchema = {
items: { items: {
type: 'string', type: 'string',
}, },
description: 'List of feature toggle names', description: 'List of feature flag names',
example: ['my-feature-4', 'my-feature-5', 'my-feature-6'], example: ['my-feature-4', 'my-feature-5', 'my-feature-6'],
}, },
}, },

View File

@ -12,24 +12,24 @@ export const clientFeatureSchema = {
type: 'object', type: 'object',
required: ['name', 'enabled'], required: ['name', 'enabled'],
description: description:
'Feature toggle configuration used by SDKs to evaluate state of a toggle', 'Feature flag configuration used by SDKs to evaluate state of a flag',
additionalProperties: false, additionalProperties: false,
properties: { properties: {
name: { name: {
type: 'string', type: 'string',
description: description:
'The unique name of a feature toggle. Is validated to be URL safe on creation', 'The unique name of a feature flag. Is validated to be URL safe on creation',
example: 'new.payment.flow.stripe', example: 'new.payment.flow.stripe',
}, },
type: { type: {
type: 'string', type: 'string',
description: description:
'What kind of feature flag is this. Refer to the documentation on [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) for more information', 'What kind of feature flag is this. Refer to the documentation on [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types) for more information',
example: 'release', example: 'release',
}, },
description: { description: {
type: 'string', type: 'string',
description: 'A description of the toggle', description: 'A description of the flag',
nullable: true, nullable: true,
example: 'No variants here', example: 'No variants here',
}, },
@ -41,26 +41,26 @@ export const clientFeatureSchema = {
}, },
stale: { stale: {
description: description:
'If this is true Unleash believes this feature toggle has been active longer than Unleash expects a toggle of this type to be active', 'If this is true Unleash believes this feature flag has been active longer than Unleash expects a flag of this type to be active',
type: 'boolean', type: 'boolean',
example: false, example: false,
}, },
impressionData: { impressionData: {
description: description:
'Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this toggle is evaluated', 'Set to true if SDKs should trigger [impression events](https://docs.getunleash.io/reference/impression-data) when this flag is evaluated',
type: 'boolean', type: 'boolean',
nullable: true, nullable: true,
example: false, example: false,
}, },
project: { project: {
description: 'Which project this feature toggle belongs to', description: 'Which project this feature flag belongs to',
type: 'string', type: 'string',
example: 'new.payment.flow', example: 'new.payment.flow',
}, },
strategies: { strategies: {
type: 'array', type: 'array',
description: description:
'Evaluation strategies for this toggle. Each entry in this list will be evaluated and ORed together', 'Evaluation strategies for this flag. Each entry in this list will be evaluated and ORed together',
items: { items: {
$ref: '#/components/schemas/featureStrategySchema', $ref: '#/components/schemas/featureStrategySchema',
}, },
@ -68,7 +68,7 @@ export const clientFeatureSchema = {
variants: { variants: {
type: 'array', type: 'array',
description: description:
'[Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this toggle', '[Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this flag',
items: { items: {
$ref: '#/components/schemas/variantSchema', $ref: '#/components/schemas/variantSchema',
}, },
@ -76,7 +76,7 @@ export const clientFeatureSchema = {
}, },
dependencies: { dependencies: {
type: 'array', type: 'array',
description: 'Feature dependencies for this toggle', description: 'Feature dependencies for this flag',
items: { items: {
$ref: '#/components/schemas/dependentFeatureSchema', $ref: '#/components/schemas/dependentFeatureSchema',
}, },

View File

@ -36,7 +36,7 @@ export const clientFeaturesQuerySchema = {
environment: { environment: {
type: 'string', type: 'string',
description: description:
'Strategies for the feature toggle configured for this environment are included. (DEPRECATED) - Handled by API tokens', 'Strategies for the feature flag configured for this environment are included. (DEPRECATED) - Handled by API tokens',
deprecated: true, deprecated: true,
}, },
inlineSegmentConstraints: { inlineSegmentConstraints: {

View File

@ -26,7 +26,7 @@ export const clientFeaturesSchema = {
minimum: 0, minimum: 0,
}, },
features: { features: {
description: 'A list of feature toggles with their configuration', description: 'A list of feature flags with their configuration',
type: 'array', type: 'array',
items: { items: {
$ref: '#/components/schemas/clientFeatureSchema', $ref: '#/components/schemas/clientFeatureSchema',

View File

@ -3,7 +3,7 @@ import type { FromSchema } from 'json-schema-to-ts';
export const createFeatureSchema = { export const createFeatureSchema = {
$id: '#/components/schemas/createFeatureSchema', $id: '#/components/schemas/createFeatureSchema',
type: 'object', type: 'object',
description: 'Data used to create a new feature toggle.', description: 'Data used to create a new feature flag.',
required: ['name'], required: ['name'],
properties: { properties: {
name: { name: {
@ -15,7 +15,7 @@ export const createFeatureSchema = {
type: 'string', type: 'string',
example: 'release', example: 'release',
description: description:
"The feature toggle's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission", "The feature flag's [type](https://docs.getunleash.io/reference/feature-toggle-types). One of experiment, kill-switch, release, operational, or permission",
}, },
description: { description: {
type: 'string', type: 'string',

View File

@ -10,7 +10,7 @@ export const createStrategyVariantSchema = {
name: { name: {
type: 'string', type: 'string',
description: description:
'The variant name. Must be unique for this feature toggle', 'The variant name. Must be unique for this feature flag',
example: 'blue_group', example: 'blue_group',
}, },
weight: { weight: {

View File

@ -10,12 +10,12 @@ export const doraFeaturesSchema = {
properties: { properties: {
name: { name: {
type: 'string', type: 'string',
description: 'The name of a feature toggle', description: 'The name of a feature flag',
}, },
timeToProduction: { timeToProduction: {
type: 'number', type: 'number',
description: description:
'The average number of days it takes a feature toggle to get into production', 'The average number of days it takes a feature flag to get into production',
}, },
}, },
components: {}, components: {},

View File

@ -8,10 +8,10 @@ const eventDataSchema = {
nullable: true, nullable: true,
'x-enforcer-exception-skip-codes': 'WSCH006', // allow additional properties in example (openapi enforcer) 'x-enforcer-exception-skip-codes': 'WSCH006', // allow additional properties in example (openapi enforcer)
description: description:
'Extra associated data related to the event, such as feature toggle state, segment configuration, etc., if applicable.', 'Extra associated data related to the event, such as feature flag state, segment configuration, etc., if applicable.',
example: { example: {
name: 'new-feature', name: 'new-feature',
description: 'Toggle description', description: 'Flag description',
type: 'release', type: 'release',
project: 'my-project', project: 'my-project',
stale: false, stale: false,
@ -61,7 +61,7 @@ export const eventSchema = {
environment: { environment: {
type: 'string', type: 'string',
description: description:
'The feature toggle environment the event relates to, if applicable.', 'The feature flag environment the event relates to, if applicable.',
nullable: true, nullable: true,
example: 'development', example: 'development',
}, },
@ -75,7 +75,7 @@ export const eventSchema = {
type: 'string', type: 'string',
nullable: true, nullable: true,
description: description:
'The name of the feature toggle the event relates to, if applicable.', 'The name of the feature flag the event relates to, if applicable.',
example: 'my.first.feature', example: 'my.first.feature',
}, },
data: eventDataSchema, data: eventDataSchema,

View File

@ -70,7 +70,7 @@ export const exportQueryParameters = [
default: true, default: true,
}, },
description: description:
'Whether feature toggles should be included in the exported data.', 'Whether feature flags should be included in the exported data.',
in: 'query', in: 'query',
}, },
{ {

View File

@ -20,7 +20,7 @@ export const exportResultSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
description: description:
'The result of the export operation, providing you with the feature toggle definitions, strategy definitions and the rest of the elements relevant to the features (tags, environments etc.)', 'The result of the export operation, providing you with the feature flag definitions, strategy definitions and the rest of the elements relevant to the features (tags, environments etc.)',
required: ['features', 'featureStrategies', 'tagTypes'], required: ['features', 'featureStrategies', 'tagTypes'],
properties: { properties: {
features: { features: {

View File

@ -7,7 +7,7 @@ export const featureEventsSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: ['events'], required: ['events'],
description: 'One or more events happening to a specific feature toggle', description: 'One or more events happening to a specific feature flag',
properties: { properties: {
version: { version: {
type: 'integer', type: 'integer',
@ -17,10 +17,9 @@ export const featureEventsSchema = {
example: 1, example: 1,
}, },
toggleName: { toggleName: {
description: description: 'The name of the feature flag these events relate to',
'The name of the feature toggle these events relate to',
type: 'string', type: 'string',
example: 'my.first.feature.toggle', example: 'my.first.feature.flag',
}, },
events: { events: {
description: 'The list of events', description: 'The list of events',
@ -28,7 +27,7 @@ export const featureEventsSchema = {
items: { $ref: eventSchema.$id }, items: { $ref: eventSchema.$id },
}, },
totalEvents: { totalEvents: {
description: 'How many events are there for this feature toggle', description: 'How many events are there for this feature flag',
type: 'integer', type: 'integer',
minimum: 0, minimum: 0,
example: 13, example: 13,

View File

@ -13,7 +13,7 @@ export const featureSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: ['name'], required: ['name'],
description: 'A feature toggle definition', description: 'A feature flag definition',
properties: { properties: {
name: { name: {
type: 'string', type: 'string',
@ -24,7 +24,7 @@ export const featureSchema = {
type: 'string', type: 'string',
example: 'kill-switch', example: 'kill-switch',
description: description:
'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', 'Type of the flag e.g. experiment, kill-switch, release, operational, permission',
}, },
description: { description: {
type: 'string', type: 'string',

View File

@ -24,7 +24,7 @@ export const featureSearchResponseSchema = {
'environments', 'environments',
'segments', 'segments',
], ],
description: 'A feature toggle definition', description: 'A feature flag definition',
properties: { properties: {
name: { name: {
type: 'string', type: 'string',
@ -35,7 +35,7 @@ export const featureSearchResponseSchema = {
type: 'string', type: 'string',
example: 'kill-switch', example: 'kill-switch',
description: description:
'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', 'Type of the flag e.g. experiment, kill-switch, release, operational, permission',
}, },
description: { description: {
type: 'string', type: 'string',

View File

@ -4,32 +4,32 @@ export const featureTypeSchema = {
$id: '#/components/schemas/featureTypeSchema', $id: '#/components/schemas/featureTypeSchema',
type: 'object', type: 'object',
description: description:
'A [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types).', 'A [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).',
additionalProperties: false, additionalProperties: false,
required: ['id', 'name', 'description', 'lifetimeDays'], required: ['id', 'name', 'description', 'lifetimeDays'],
properties: { properties: {
id: { id: {
type: 'string', type: 'string',
description: 'The identifier of this feature toggle type.', description: 'The identifier of this feature flag type.',
example: 'kill-switch', example: 'kill-switch',
}, },
name: { name: {
type: 'string', type: 'string',
description: 'The display name of this feature toggle type.', description: 'The display name of this feature flag type.',
example: 'Kill switch', example: 'Kill switch',
}, },
description: { description: {
type: 'string', type: 'string',
description: description:
'A description of what this feature toggle type is intended to be used for.', 'A description of what this feature flag type is intended to be used for.',
example: example:
'Kill switch feature toggles are used to quickly turn on or off critical functionality in your system.', 'Kill switch feature flags are used to quickly turn on or off critical functionality in your system.',
}, },
lifetimeDays: { lifetimeDays: {
type: 'integer', type: 'integer',
minimum: 0, minimum: 0,
description: description:
'How many days it takes before a feature toggle of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale.', 'How many days it takes before a feature flag of this typed is flagged as [potentially stale](https://docs.getunleash.io/reference/technical-debt#stale-and-potentially-stale-toggles) by Unleash. If this value is `null`, Unleash will never mark it as potentially stale.',
example: 40, example: 40,
nullable: true, nullable: true,
}, },

View File

@ -6,7 +6,7 @@ export const featureTypesSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
description: description:
'A list of [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types) and the schema version used to represent those feature types.', 'A list of [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types) and the schema version used to represent those feature types.',
required: ['version', 'types'], required: ['version', 'types'],
properties: { properties: {
version: { version: {
@ -14,11 +14,11 @@ export const featureTypesSchema = {
enum: [1], enum: [1],
example: 1, example: 1,
description: description:
'The schema version used to describe the feature toggle types listed in the `types` property.', 'The schema version used to describe the feature flag types listed in the `types` property.',
}, },
types: { types: {
type: 'array', type: 'array',
description: 'The list of feature toggle types.', description: 'The list of feature flag types.',
items: { items: {
$ref: '#/components/schemas/featureTypeSchema', $ref: '#/components/schemas/featureTypeSchema',
}, },
@ -27,35 +27,35 @@ export const featureTypesSchema = {
id: 'release', id: 'release',
name: 'Release', name: 'Release',
description: description:
'Release feature toggles are used to release new features.', 'Release feature flags are used to release new features.',
lifetimeDays: 40, lifetimeDays: 40,
}, },
{ {
id: 'experiment', id: 'experiment',
name: 'Experiment', name: 'Experiment',
description: description:
'Experiment feature toggles are used to test and verify multiple different versions of a feature.', 'Experiment feature flags are used to test and verify multiple different versions of a feature.',
lifetimeDays: 40, lifetimeDays: 40,
}, },
{ {
id: 'operational', id: 'operational',
name: 'Operational', name: 'Operational',
description: description:
'Operational feature toggles are used to control aspects of a rollout.', 'Operational feature flags are used to control aspects of a rollout.',
lifetimeDays: 7, lifetimeDays: 7,
}, },
{ {
id: 'kill-switch', id: 'kill-switch',
name: 'Kill switch', name: 'Kill switch',
description: description:
'Kill switch feature toggles are used to quickly turn on or off critical functionality in your system.', 'Kill switch feature flags are used to quickly turn on or off critical functionality in your system.',
lifetimeDays: null, lifetimeDays: null,
}, },
{ {
id: 'permission', id: 'permission',
name: 'Permission', name: 'Permission',
description: description:
'Permission feature toggles are used to control permissions in your system.', 'Permission feature flags are used to control permissions in your system.',
lifetimeDays: null, lifetimeDays: null,
}, },
], ],

View File

@ -7,7 +7,7 @@ export const featureUsageSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
description: description:
'How many applications have seen this feature toggle, as well as how this feature was evaluated the last hour', 'How many applications have seen this feature flag, as well as how this feature was evaluated the last hour',
required: [ required: [
'version', 'version',
'maturity', 'maturity',

View File

@ -7,7 +7,7 @@ export const featureVariantsSchema = {
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: ['version', 'variants'], required: ['version', 'variants'],
description: 'A versioned collection of feature toggle variants.', description: 'A versioned collection of feature flag variants.',
properties: { properties: {
version: { version: {
type: 'integer', type: 'integer',
@ -19,7 +19,7 @@ export const featureVariantsSchema = {
items: { items: {
$ref: '#/components/schemas/variantSchema', $ref: '#/components/schemas/variantSchema',
}, },
description: 'All variants defined for a specific feature toggle.', description: 'All variants defined for a specific feature flag.',
}, },
}, },
components: { components: {

View File

@ -32,7 +32,7 @@ export const frontendApiFeatureSchema = {
name: { name: {
type: 'string', type: 'string',
description: description:
'The variants name. Is unique for this feature toggle', 'The variants name. Is unique for this feature flag',
example: 'blue_group', example: 'blue_group',
}, },
enabled: { enabled: {

View File

@ -5,7 +5,7 @@ export const healthReportSchema = {
...healthOverviewSchema, ...healthOverviewSchema,
$id: '#/components/schemas/healthReportSchema', $id: '#/components/schemas/healthReportSchema',
description: description:
'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature toggles.', 'A report of the current health of the requested project, with datapoints like counters of currently active, stale, and potentially stale feature flags.',
required: [ required: [
...healthOverviewSchema.required, ...healthOverviewSchema.required,
'potentiallyStaleCount', 'potentiallyStaleCount',
@ -16,17 +16,17 @@ export const healthReportSchema = {
...healthOverviewSchema.properties, ...healthOverviewSchema.properties,
potentiallyStaleCount: { potentiallyStaleCount: {
type: 'number', type: 'number',
description: 'The number of potentially stale feature toggles.', description: 'The number of potentially stale feature flags.',
example: 5, example: 5,
}, },
activeCount: { activeCount: {
type: 'number', type: 'number',
description: 'The number of active feature toggles.', description: 'The number of active feature flags.',
example: 2, example: 2,
}, },
staleCount: { staleCount: {
type: 'number', type: 'number',
description: 'The number of stale feature toggles.', description: 'The number of stale feature flags.',
example: 10, example: 10,
}, },
}, },

View File

@ -6,7 +6,7 @@ export const importTogglesValidateItemSchema = {
required: ['message', 'affectedItems'], required: ['message', 'affectedItems'],
additionalProperties: false, additionalProperties: false,
description: description:
'A description of an error or warning pertaining to a feature toggle import job.', 'A description of an error or warning pertaining to a feature flag import job.',
properties: { properties: {
message: { message: {
type: 'string', type: 'string',

View File

@ -14,7 +14,7 @@ export const unknownFeatureEvaluationResult = 'unevaluated' as const;
export const playgroundFeatureSchema = { export const playgroundFeatureSchema = {
$id: '#/components/schemas/playgroundFeatureSchema', $id: '#/components/schemas/playgroundFeatureSchema',
description: description:
'A simplified feature toggle model intended for the Unleash playground.', 'A simplified feature flag model intended for the Unleash playground.',
type: 'object', type: 'object',
additionalProperties: false, additionalProperties: false,
required: [ required: [
@ -96,7 +96,7 @@ export const playgroundFeatureSchema = {
name: { name: {
type: 'string', type: 'string',
description: description:
"The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`", "The variant's name. If there is no variant or if the flag is disabled, this will be `disabled`",
example: 'red-variant', example: 'red-variant',
}, },
enabled: { enabled: {

View File

@ -114,8 +114,7 @@ export const strategyEvaluationResults = {
export const playgroundStrategySchema = { export const playgroundStrategySchema = {
$id: '#/components/schemas/playgroundStrategySchema', $id: '#/components/schemas/playgroundStrategySchema',
type: 'object', type: 'object',
description: description: 'An evaluated feature flag strategy as used by the Playground',
'An evaluated feature toggle strategy as used by the Playground',
additionalProperties: false, additionalProperties: false,
required: [ required: [
'id', 'id',

View File

@ -11,13 +11,13 @@ export const projectDoraMetricsSchema = {
projectAverage: { projectAverage: {
type: 'number', type: 'number',
description: description:
'The average time it takes a feature toggle to be enabled in production. The measurement unit is days.', 'The average time it takes a feature flag to be enabled in production. The measurement unit is days.',
}, },
features: { features: {
type: 'array', type: 'array',
items: { $ref: '#/components/schemas/doraFeaturesSchema' }, items: { $ref: '#/components/schemas/doraFeaturesSchema' },
description: description:
'An array of objects containing feature toggle name and timeToProduction values. The measurement unit of timeToProduction is days.', 'An array of objects containing feature flag name and timeToProduction values. The measurement unit of timeToProduction is days.',
}, },
}, },
components: { components: {

View File

@ -33,18 +33,18 @@ export const projectInsightsSchema = {
}, },
activeCount: { activeCount: {
type: 'number', type: 'number',
description: 'The number of active feature toggles.', description: 'The number of active feature flags.',
example: 12, example: 12,
}, },
potentiallyStaleCount: { potentiallyStaleCount: {
type: 'number', type: 'number',
description: description:
'The number of potentially stale feature toggles.', 'The number of potentially stale feature flags.',
example: 5, example: 5,
}, },
staleCount: { staleCount: {
type: 'number', type: 'number',
description: 'The number of stale feature toggles.', description: 'The number of stale feature flags.',
example: 10, example: 10,
}, },
}, },

View File

@ -30,25 +30,25 @@ Stats are divided into current and previous **windows**.
type: 'number', type: 'number',
example: 15, example: 15,
description: description:
'The number of feature toggles created during the current window', 'The number of feature flags created during the current window',
}, },
createdPastWindow: { createdPastWindow: {
type: 'number', type: 'number',
example: 15, example: 15,
description: description:
'The number of feature toggles created during the previous window', 'The number of feature flags created during the previous window',
}, },
archivedCurrentWindow: { archivedCurrentWindow: {
type: 'number', type: 'number',
example: 5, example: 5,
description: description:
'The number of feature toggles that were archived during the current window', 'The number of feature flags that were archived during the current window',
}, },
archivedPastWindow: { archivedPastWindow: {
type: 'number', type: 'number',
example: 5, example: 5,
description: description:
'The number of feature toggles that were archived during the previous window', 'The number of feature flags that were archived during the previous window',
}, },
projectActivityCurrentWindow: { projectActivityCurrentWindow: {
type: 'number', type: 'number',

View File

@ -22,8 +22,8 @@ export const searchEventsSchema = {
}, },
feature: { feature: {
type: 'string', type: 'string',
description: 'Find events by feature toggle name (case-sensitive).', description: 'Find events by feature flag name (case-sensitive).',
example: 'my.first.toggle', example: 'my.first.flag',
}, },
query: { query: {
type: 'string', type: 'string',

View File

@ -14,7 +14,7 @@ export const uiConfigSchema = {
slogan: { slogan: {
type: 'string', type: 'string',
description: 'The slogan to display in the UI footer.', description: 'The slogan to display in the UI footer.',
example: 'The enterprise-ready feature toggle service.', example: 'The enterprise-ready feature flag service.',
}, },
name: { name: {
type: 'string', type: 'string',

View File

@ -4,7 +4,7 @@ import { constraintSchema } from './constraint-schema';
export const updateFeatureSchema = { export const updateFeatureSchema = {
$id: '#/components/schemas/updateFeatureSchema', $id: '#/components/schemas/updateFeatureSchema',
type: 'object', type: 'object',
description: 'Data used for updating a feature toggle', description: 'Data used for updating a feature flag',
properties: { properties: {
description: { description: {
type: 'string', type: 'string',
@ -16,7 +16,7 @@ export const updateFeatureSchema = {
type: 'string', type: 'string',
example: 'kill-switch', example: 'kill-switch',
description: description:
'Type of the toggle e.g. experiment, kill-switch, release, operational, permission', 'Type of the flag e.g. experiment, kill-switch, release, operational, permission',
}, },
stale: { stale: {
type: 'boolean', type: 'boolean',
@ -27,7 +27,7 @@ export const updateFeatureSchema = {
type: 'boolean', type: 'boolean',
example: true, example: true,
description: description:
'If `true` the feature toggle will be moved to the [archive](https://docs.getunleash.io/reference/archived-toggles) with a property `archivedAt` set to current time', 'If `true` the feature flag will be moved to the [archive](https://docs.getunleash.io/reference/archived-toggles) with a property `archivedAt` set to current time',
}, },
impressionData: { impressionData: {
type: 'boolean', type: 'boolean',

View File

@ -5,11 +5,11 @@ export const updateFeatureTypeLifetimeSchema = {
type: 'object', type: 'object',
required: ['lifetimeDays'], required: ['lifetimeDays'],
description: description:
'Data used when updating the lifetime of a [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types).', 'Data used when updating the lifetime of a [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).',
properties: { properties: {
lifetimeDays: { lifetimeDays: {
description: description:
'The new lifetime (in days) that you want to assign to the feature toggle type. If the value is `null` or `0`, then the feature toggles of that type will never be marked as potentially stale. Otherwise, they will be considered potentially stale after the number of days indicated by this property.', 'The new lifetime (in days) that you want to assign to the feature flag type. If the value is `null` or `0`, then the feature flags of that type will never be marked as potentially stale. Otherwise, they will be considered potentially stale after the number of days indicated by this property.',
example: 7, example: 7,
type: 'integer', type: 'integer',
nullable: true, nullable: true,

View File

@ -4,7 +4,7 @@ export const validateFeatureSchema = {
$id: '#/components/schemas/validateFeatureSchema', $id: '#/components/schemas/validateFeatureSchema',
type: 'object', type: 'object',
required: ['name'], required: ['name'],
description: "Data used to validate a feature toggle's name.", description: "Data used to validate a feature flag's name.",
properties: { properties: {
name: { name: {
description: 'The feature name to validate.', description: 'The feature name to validate.',

View File

@ -11,7 +11,7 @@ export const variantSchema = {
properties: { properties: {
name: { name: {
type: 'string', type: 'string',
description: 'The variants name. Is unique for this feature toggle', description: 'The variants name. Is unique for this feature flag',
example: 'blue_group', example: 'blue_group',
}, },
weight: { weight: {

View File

@ -21,13 +21,13 @@ const OPENAPI_TAGS = [
{ {
name: 'Archive', name: 'Archive',
description: description:
'Revive or permanently delete [archived feature toggles](https://docs.getunleash.io/advanced/archived_toggles).', 'Revive or permanently delete [archived feature flags](https://docs.getunleash.io/advanced/archived_toggles).',
}, },
{ name: 'Auth', description: 'Manage logins, passwords, etc.' }, { name: 'Auth', description: 'Manage logins, passwords, etc.' },
{ {
name: 'Banners', name: 'Banners',
description: description:
'Create, update, toggle, and delete [banners](https://docs.getunleash.io/reference/banners).', 'Create, update, flag, and delete [banners](https://docs.getunleash.io/reference/banners).',
}, },
{ {
name: 'Change Requests', name: 'Change Requests',
@ -58,12 +58,12 @@ const OPENAPI_TAGS = [
{ {
name: 'Feature Types', name: 'Feature Types',
description: description:
'Manage [feature toggle types](https://docs.getunleash.io/reference/feature-toggle-types).', 'Manage [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types).',
}, },
{ {
name: 'Features', name: 'Features',
description: description:
'Create, update, and delete [features toggles](https://docs.getunleash.io/reference/feature-toggles).', 'Create, update, and delete [features flags](https://docs.getunleash.io/reference/feature-toggles).',
}, },
{ {
name: 'Frontend API', name: 'Frontend API',
@ -105,8 +105,7 @@ const OPENAPI_TAGS = [
}, },
{ {
name: 'Playground', name: 'Playground',
description: description: 'Evaluate an Unleash context against your feature flags.',
'Evaluate an Unleash context against your feature toggles.',
}, },
{ {
name: 'Projects', name: 'Projects',

View File

@ -88,9 +88,9 @@ export default class EventController extends Controller {
200: createResponseSchema('featureEventsSchema'), 200: createResponseSchema('featureEventsSchema'),
}, },
description: description:
'Returns all events related to the specified feature toggle. If the feature toggle does not exist, the list of events will be empty.', 'Returns all events related to the specified feature flag. If the feature flag does not exist, the list of events will be empty.',
summary: summary:
'Get all events related to a specific feature toggle.', 'Get all events related to a specific feature flag.',
}), }),
], ],
}); });

View File

@ -75,9 +75,9 @@ export class FeatureTypeController extends Controller {
tags: ['Feature Types'], tags: ['Feature Types'],
operationId: 'updateFeatureTypeLifetime', operationId: 'updateFeatureTypeLifetime',
summary: 'Update feature type lifetime', summary: 'Update feature type lifetime',
description: `Updates the lifetime configuration for the specified [feature toggle type](https://docs.getunleash.io/reference/feature-toggle-types). The expected lifetime is an integer representing the number of days before Unleash marks a feature toggle of that type as potentially stale. If set to \`null\` or \`0\`, then feature toggles of that particular type will never be marked as potentially stale. description: `Updates the lifetime configuration for the specified [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types). The expected lifetime is an integer representing the number of days before Unleash marks a feature flag of that type as potentially stale. If set to \`null\` or \`0\`, then feature flags of that particular type will never be marked as potentially stale.
When a feature toggle type's expected lifetime is changed, this will also cause any feature toggles of this type to be reevaluated for potential staleness.`, When a feature flag type's expected lifetime is changed, this will also cause any feature flags of this type to be reevaluated for potential staleness.`,
responses: { responses: {
200: createResponseSchema('featureTypeSchema'), 200: createResponseSchema('featureTypeSchema'),
...getStandardResponses(400, 401, 403, 404, 409, 415), ...getStandardResponses(400, 401, 403, 404, 409, 415),

View File

@ -109,7 +109,7 @@ export default class VariantsController extends Controller {
middleware: [ middleware: [
openApiService.validPath({ openApiService.validPath({
summary: summary:
'Create (overwrite) variants for a feature toggle in all environments', 'Create (overwrite) variants for a feature flag in all environments',
description: `This overwrites the current variants for the feature specified in the :featureName parameter in all environments. description: `This overwrites the current variants for the feature specified in the :featureName parameter in all environments.
The backend will validate the input for the following invariants The backend will validate the input for the following invariants
@ -174,7 +174,7 @@ The backend will also distribute remaining weight up to 1000 after adding the va
openApiService.validPath({ openApiService.validPath({
summary: summary:
'Create (overwrite) variants for a feature in an environment', 'Create (overwrite) variants for a feature in an environment',
description: `This overwrites the current variants for the feature toggle in the :featureName parameter for the :environment parameter. description: `This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter.
The backend will validate the input for the following invariants: The backend will validate the input for the following invariants:
@ -202,9 +202,9 @@ The backend will also distribute remaining weight up to 1000 after adding the va
tags: ['Features'], tags: ['Features'],
operationId: 'overwriteFeatureVariantsOnEnvironments', operationId: 'overwriteFeatureVariantsOnEnvironments',
summary: summary:
'Create (overwrite) variants for a feature toggle in multiple environments', 'Create (overwrite) variants for a feature flag in multiple environments',
description: description:
'This overwrites the current variants for the feature toggle in the :featureName parameter for the :environment parameter.', 'This overwrites the current variants for the feature flag in the :featureName parameter for the :environment parameter.',
requestBody: createRequestSchema('pushVariantsSchema'), requestBody: createRequestSchema('pushVariantsSchema'),
responses: { responses: {
200: createResponseSchema('featureVariantsSchema'), 200: createResponseSchema('featureVariantsSchema'),

View File

@ -308,7 +308,7 @@ test('should export featureToggles', async () => {
expect(data.features[0].name).toBe('a-feature'); expect(data.features[0].name).toBe('a-feature');
}); });
test('archived feature toggles should not be included', async () => { test('archived feature flags should not be included', async () => {
const { stateService, stores } = getSetup(); const { stateService, stores } = getSetup();
await stores.featureToggleStore.create('default', { await stores.featureToggleStore.create('default', {
@ -321,7 +321,7 @@ test('archived feature toggles should not be included', async () => {
expect(data.features).toHaveLength(0); expect(data.features).toHaveLength(0);
}); });
test('featureStrategy connected to an archived feature toggle should not be included', async () => { test('featureStrategy connected to an archived feature flag should not be included', async () => {
const { stateService, stores } = getSetup(); const { stateService, stores } = getSetup();
const featureName = 'fstrat-archived-feature'; const featureName = 'fstrat-archived-feature';
await stores.featureToggleStore.create('default', { await stores.featureToggleStore.create('default', {

View File

@ -320,9 +320,7 @@ export default class StateService {
? [] ? []
: await this.featureStrategiesStore.getAll(); : await this.featureStrategiesStore.getAll();
if (dropBeforeImport) { if (dropBeforeImport) {
this.logger.info( this.logger.info('Dropping existing strategies for feature flags');
'Dropping existing strategies for feature toggles',
);
await this.featureStrategiesStore.deleteAll(); await this.featureStrategiesStore.deleteAll();
} }
const strategiesToImport = keepExisting const strategiesToImport = keepExisting
@ -376,13 +374,13 @@ export default class StateService {
keepExisting, keepExisting,
featureEnvironments, featureEnvironments,
}): Promise<void> { }): Promise<void> {
this.logger.info(`Importing ${features.length} feature toggles`); this.logger.info(`Importing ${features.length} feature flags`);
const oldToggles = dropBeforeImport const oldToggles = dropBeforeImport
? [] ? []
: await this.toggleStore.getAll(); : await this.toggleStore.getAll();
if (dropBeforeImport) { if (dropBeforeImport) {
this.logger.info('Dropping existing feature toggles'); this.logger.info('Dropping existing feature flags');
await this.toggleStore.deleteAll(); await this.toggleStore.deleteAll();
await this.eventService.storeEvent({ await this.eventService.storeEvent({
type: DROP_FEATURES, type: DROP_FEATURES,

View File

@ -52,7 +52,7 @@ beforeAll(async () => {
await app.archiveFeature('featureArchivedZ'); await app.archiveFeature('featureArchivedZ');
await app.createFeature({ await app.createFeature({
name: 'feature.with.variants', name: 'feature.with.variants',
description: 'A feature toggle with variants', description: 'A feature flag with variants',
variants: [ variants: [
{ name: 'control', weight: 50 }, { name: 'control', weight: 50 },
{ name: 'new', weight: 50 }, { name: 'new', weight: 50 },
@ -65,7 +65,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('returns three archived toggles', async () => { test('returns three archived flags', async () => {
expect.assertions(1); expect.assertions(1);
return app.request return app.request
.get('/api/admin/archive/features') .get('/api/admin/archive/features')
@ -76,7 +76,7 @@ test('returns three archived toggles', async () => {
}); });
}); });
test('returns three archived toggles with archivedAt', async () => { test('returns three archived flags with archivedAt', async () => {
expect.assertions(2); expect.assertions(2);
return app.request return app.request
.get('/api/admin/archive/features') .get('/api/admin/archive/features')
@ -102,12 +102,12 @@ test('archived feature is not accessible via /features/:featureName', async () =
await app.getProjectFeatures('default', 'featureArchivedZ', 404); await app.getProjectFeatures('default', 'featureArchivedZ', 404);
}); });
test('must set name when reviving toggle', async () => { test('must set name when reviving flag', async () => {
expect.assertions(0); expect.assertions(0);
return app.request.post('/api/admin/archive/revive/').expect(404); return app.request.post('/api/admin/archive/revive/').expect(404);
}); });
test('should be allowed to reuse deleted toggle name', async () => { test('should be allowed to reuse deleted flag name', async () => {
expect.assertions(2); expect.assertions(2);
await app.request await app.request
.post('/api/admin/projects/default/features') .post('/api/admin/projects/default/features')
@ -134,7 +134,7 @@ test('should be allowed to reuse deleted toggle name', async () => {
.set('Content-Type', 'application/json') .set('Content-Type', 'application/json')
.expect(200); .expect(200);
}); });
test('Deleting an unarchived toggle should not take effect', async () => { test('Deleting an unarchived flag should not take effect', async () => {
expect.assertions(2); expect.assertions(2);
await app.request await app.request
.post('/api/admin/projects/default/features') .post('/api/admin/projects/default/features')

View File

@ -12,7 +12,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('creates new feature toggle with createdBy', async () => { test('creates new feature flag with createdBy', async () => {
expect.assertions(1); expect.assertions(1);
const { request, destroy } = await setupAppWithAuth(db.stores); const { request, destroy } = await setupAppWithAuth(db.stores);
@ -22,7 +22,7 @@ test('creates new feature toggle with createdBy', async () => {
email: 'user@mail.com', email: 'user@mail.com',
}); });
// create toggle // create flag
await request await request
.post('/api/admin/projects/default/features') .post('/api/admin/projects/default/features')
.send({ .send({

View File

@ -40,7 +40,7 @@ test('should require authenticated user', async () => {
await destroy(); await destroy();
}); });
test('creates new feature toggle with createdBy', async () => { test('creates new feature flag with createdBy', async () => {
expect.assertions(1); expect.assertions(1);
const email = 'custom-user@mail.com'; const email = 'custom-user@mail.com';
@ -52,7 +52,7 @@ test('creates new feature toggle with createdBy', async () => {
}; };
const { request, destroy } = await setupAppWithCustomAuth(stores, preHook); const { request, destroy } = await setupAppWithCustomAuth(stores, preHook);
// create toggle // create flag
await request await request
.post('/api/admin/projects/default/features') .post('/api/admin/projects/default/features')
.send({ .send({

View File

@ -16,7 +16,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('should not allow to create feature toggles in maintenance mode', async () => { test('should not allow to create feature flags in maintenance mode', async () => {
const appWithMaintenanceMode = await setupAppWithCustomConfig(db.stores, { const appWithMaintenanceMode = await setupAppWithCustomConfig(db.stores, {
experimental: { experimental: {
flags: { flags: {

View File

@ -312,7 +312,7 @@ test('Can push variants to multiple environments', async () => {
}); });
}); });
test("Returns proper error if project and/or feature toggle doesn't exist", async () => { test("Returns proper error if project and/or feature flag doesn't exist", async () => {
await app.request await app.request
.put( .put(
`/api/admin/projects/nonexistent/features/undefined/variants-batch`, `/api/admin/projects/nonexistent/features/undefined/variants-batch`,

View File

@ -433,7 +433,7 @@ test(`should not delete api_tokens on import when drop-flag is set`, async () =>
expect(apiTokens[0].username).toBe(apiTokenName); expect(apiTokens[0].username).toBe(apiTokenName);
}); });
test(`should not show environment on feature toggle, when environment is disabled`, async () => { test(`should not show environment on feature flag, when environment is disabled`, async () => {
await app.request await app.request
.post('/api/admin/state/import?drop=true') .post('/api/admin/state/import?drop=true')
.attach('file', 'src/test/examples/import-state.json') .attach('file', 'src/test/examples/import-state.json')

View File

@ -83,7 +83,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('returns three feature toggles', async () => { test('returns three feature flags', async () => {
return app.request return app.request
.get('/api/client/features') .get('/api/client/features')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)

View File

@ -103,7 +103,7 @@ beforeAll(async () => {
'default', 'default',
{ {
name: 'feature.with.variants', name: 'feature.with.variants',
description: 'A feature toggle with variants', description: 'A feature flag with variants',
}, },
TEST_AUDIT_USER, TEST_AUDIT_USER,
); );
@ -133,7 +133,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('returns four feature toggles', async () => { test('returns four feature flags', async () => {
return app.request return app.request
.get('/api/client/features') .get('/api/client/features')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
@ -163,7 +163,7 @@ test('returns dependencies', async () => {
}); });
}); });
test('returns four feature toggles without createdAt', async () => { test('returns four feature flags without createdAt', async () => {
return app.request return app.request
.get('/api/client/features') .get('/api/client/features')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
@ -181,7 +181,7 @@ test('gets a feature by name', async () => {
.expect(200); .expect(200);
}); });
test('returns a feature toggles impression data', async () => { test('returns a feature flags impression data', async () => {
return app.request return app.request
.get('/api/client/features/featureX') .get('/api/client/features/featureX')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
@ -221,7 +221,7 @@ test('Can get strategies for specific environment', async () => {
const featureName = 'test.feature.with.env'; const featureName = 'test.feature.with.env';
const env = DEFAULT_ENV; const env = DEFAULT_ENV;
// Create feature toggle // Create feature flag
await app.request.post('/api/admin/projects/default/features').send({ await app.request.post('/api/admin/projects/default/features').send({
name: featureName, name: featureName,
type: 'killswitch', type: 'killswitch',
@ -322,7 +322,7 @@ test('Can use multiple filters', async () => {
}); });
}); });
test('returns a feature toggles impression data for a different project', async () => { test('returns a feature flags impression data for a different project', async () => {
const project = { const project = {
id: 'impression-data-client', id: 'impression-data-client',
name: 'ImpressionData', name: 'ImpressionData',
@ -332,14 +332,14 @@ test('returns a feature toggles impression data for a different project', async
await db.stores.projectStore.create(project); await db.stores.projectStore.create(project);
const toggle = { const flag = {
name: 'project-client.impression.data', name: 'project-client.impression.data',
impressionData: true, impressionData: true,
}; };
await app.request await app.request
.post('/api/admin/projects/impression-data-client/features') .post('/api/admin/projects/impression-data-client/features')
.send(toggle) .send(flag)
.expect(201) .expect(201)
.expect((res) => { .expect((res) => {
expect(res.body.impressionData).toBe(true); expect(res.body.impressionData).toBe(true);
@ -349,12 +349,12 @@ test('returns a feature toggles impression data for a different project', async
.get('/api/client/features') .get('/api/client/features')
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
.expect((res) => { .expect((res) => {
const projectToggle = res.body.features.find( const projectFlag = res.body.features.find(
(resToggle) => resToggle.project === project.id, (resFlag) => resFlag.project === project.id,
); );
expect(projectToggle.name).toBe(toggle.name); expect(projectFlag.name).toBe(flag.name);
expect(projectToggle.project).toBe(project.id); expect(projectFlag.project).toBe(project.id);
expect(projectToggle.impressionData).toBe(true); expect(projectFlag.impressionData).toBe(true);
}); });
}); });

View File

@ -41,7 +41,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('returns feature toggle for default env', async () => { test('returns feature flag for default env', async () => {
await app.services.featureToggleServiceV2.updateEnabled( await app.services.featureToggleServiceV2.updateEnabled(
'default', 'default',
'feature.default.1', 'feature.default.1',
@ -61,7 +61,7 @@ test('returns feature toggle for default env', async () => {
}); });
}); });
test('returns feature toggle for default env even if it is removed from project', async () => { test('returns feature flag for default env even if it is removed from project', async () => {
await db.stores.featureEnvironmentStore.disconnectFeatures( await db.stores.featureEnvironmentStore.disconnectFeatures(
'default', 'default',
'default', 'default',

View File

@ -93,7 +93,7 @@ beforeAll(async () => {
'default', 'default',
{ {
name: 'feature.with.variants', name: 'feature.with.variants',
description: 'A feature toggle with variants', description: 'A feature flag with variants',
}, },
TEST_AUDIT_USER, TEST_AUDIT_USER,
); );

View File

@ -121,7 +121,7 @@ afterAll(async () => {
await db.destroy(); await db.destroy();
}); });
test('returns feature toggle with "default" config', async () => { test('returns feature flag with "default" config', async () => {
const token = await apiTokenService.createApiToken({ const token = await apiTokenService.createApiToken({
type: ApiTokenType.CLIENT, type: ApiTokenType.CLIENT,
tokenName, tokenName,
@ -143,7 +143,7 @@ test('returns feature toggle with "default" config', async () => {
}); });
}); });
test('returns feature toggle with testing environment config', async () => { test('returns feature flag with testing environment config', async () => {
const token = await apiTokenService.createApiToken({ const token = await apiTokenService.createApiToken({
type: ApiTokenType.CLIENT, type: ApiTokenType.CLIENT,
tokenName: tokenName, tokenName: tokenName,
@ -169,7 +169,7 @@ test('returns feature toggle with testing environment config', async () => {
}); });
}); });
test('returns feature toggle for project2', async () => { test('returns feature flag for project2', async () => {
const token = await apiTokenService.createApiToken({ const token = await apiTokenService.createApiToken({
type: ApiTokenType.CLIENT, type: ApiTokenType.CLIENT,
tokenName: tokenName, tokenName: tokenName,
@ -189,7 +189,7 @@ test('returns feature toggle for project2', async () => {
}); });
}); });
test('returns feature toggle for all projects', async () => { test('returns feature flag for all projects', async () => {
const token = await apiTokenService.createApiToken({ const token = await apiTokenService.createApiToken({
type: ApiTokenType.CLIENT, type: ApiTokenType.CLIENT,
tokenName: tokenName, tokenName: tokenName,