1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00

fix: Remove strictSchemaValidation feature flag

This commit is contained in:
unleash-bot 2025-08-27 13:12:01 +00:00
parent ac11af8c05
commit fff6af5e74
52 changed files with 39 additions and 141 deletions

View File

@ -155,7 +155,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
deltaApi: true, deltaApi: true,
}, },
}, },
@ -168,9 +167,7 @@ beforeAll(async () => {
enterpriseDb.stores, enterpriseDb.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
ui: { ui: {
environment: 'Enterprise', environment: 'Enterprise',
@ -184,9 +181,7 @@ beforeAll(async () => {
proDb.stores, proDb.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
ui: { ui: {
environment: 'Pro', environment: 'Pro',

View File

@ -27,7 +27,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
enableLegacyVariants: true, enableLegacyVariants: true,
}, },
}, },

View File

@ -18,9 +18,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
isOss: true, isOss: true,
}, },

View File

@ -17,9 +17,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -27,7 +27,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
anonymiseEventLog: true, anonymiseEventLog: true,
}, },
}, },

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -22,9 +22,7 @@ const setupLastSeenAtTest = async (featureName: string) => {
beforeAll(async () => { beforeAll(async () => {
const config: Partial<IUnleashOptions> = { const config: Partial<IUnleashOptions> = {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}; };

View File

@ -23,7 +23,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
anonymiseEventLog: true, anonymiseEventLog: true,
}, },
}, },

View File

@ -93,7 +93,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
featureCollaborators: true, featureCollaborators: true,
}, },
}, },
@ -3329,7 +3328,6 @@ test('Updating feature strategy sort-order should return strategies in correct o
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
strategyVariant: true, strategyVariant: true,
}, },
}, },
@ -3396,7 +3394,6 @@ test('Updating feature strategy sort-order should trigger a an event', async ()
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: false,
strategyVariant: true, strategyVariant: true,
}, },
}, },

View File

@ -30,7 +30,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
extendedUsageMetrics: true, extendedUsageMetrics: true,
}, },
}, },

View File

@ -18,9 +18,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -34,9 +34,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -20,7 +20,6 @@ beforeAll(async () => {
experimental: { experimental: {
flags: { flags: {
advancedPlayground: true, advancedPlayground: true,
strictSchemaValidation: true,
strategyVariant: true, strategyVariant: true,
}, },
}, },

View File

@ -21,7 +21,7 @@ async function getSetup() {
const stores = createStores(); const stores = createStores();
const config = createTestConfig({ const config = createTestConfig({
server: { baseUriPath: base }, server: { baseUriPath: base },
experimental: { flags: { strictSchemaValidation: true } }, experimental: { flags: {} },
}); });
const services = createServices(stores, config); const services = createServices(stores, config);
const app = await getApp(config, stores, services); const app = await getApp(config, stores, services);

View File

@ -17,9 +17,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -55,9 +55,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -39,9 +39,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -21,9 +21,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -20,9 +20,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -107,9 +107,6 @@ export class OpenApiService {
`Invalid response for ${res.req?.originalUrl || ''}:`, `Invalid response for ${res.req?.originalUrl || ''}:`,
errors, errors,
); );
if (this.flagResolver.isEnabled('strictSchemaValidation')) {
throw new Error(JSON.stringify(errors, null, 4));
}
} }
Object.entries(headers).forEach(([header, value]) => Object.entries(headers).forEach(([header, value]) =>

View File

@ -12,7 +12,6 @@ export type IFlagKey =
| 'responseTimeWithAppNameKillSwitch' | 'responseTimeWithAppNameKillSwitch'
| 'maintenanceMode' | 'maintenanceMode'
| 'messageBanner' | 'messageBanner'
| 'strictSchemaValidation'
| 'personalAccessTokensKillSwitch' | 'personalAccessTokensKillSwitch'
| 'migrationLock' | 'migrationLock'
| 'demo' | 'demo'
@ -89,10 +88,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_MESSAGE_BANNER_PAYLOAD ?? '', process.env.UNLEASH_EXPERIMENTAL_MESSAGE_BANNER_PAYLOAD ?? '',
}, },
}, },
strictSchemaValidation: parseEnvVarBoolean(
process.env.UNLEASH_STRICT_SCHEMA_VALIDTION,
false,
),
personalAccessTokensKillSwitch: parseEnvVarBoolean( personalAccessTokensKillSwitch: parseEnvVarBoolean(
process.env.UNLEASH_PAT_KILL_SWITCH, process.env.UNLEASH_PAT_KILL_SWITCH,
false, false,

View File

@ -50,7 +50,6 @@ process.nextTick(async () => {
showUserDeviceCount: true, showUserDeviceCount: true,
deltaApi: true, deltaApi: true,
uniqueSdkTracking: true, uniqueSdkTracking: true,
strictSchemaValidation: true,
reportUnknownFlags: true, reportUnknownFlags: true,
customMetrics: true, customMetrics: true,
impactMetrics: true, impactMetrics: true,

View File

@ -13,9 +13,7 @@ beforeAll(async () => {
db = await dbInit('addon_api_serial', getLogger); db = await dbInit('addon_api_serial', getLogger);
app = await setupAppWithCustomConfig(db.stores, { app = await setupAppWithCustomConfig(db.stores, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
}); });

View File

@ -18,9 +18,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -53,9 +53,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -17,9 +17,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,
@ -80,7 +78,6 @@ describe('maxSessionsCount', () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
showUserDeviceCount: true, showUserDeviceCount: true,
}, },
}, },

View File

@ -14,9 +14,7 @@ beforeAll(async () => {
db = await dbInit('constraints', getLogger); db = await dbInit('constraints', getLogger);
app = await setupAppWithCustomConfig(db.stores, { app = await setupAppWithCustomConfig(db.stores, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
}); });

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -36,9 +36,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -28,9 +28,7 @@ beforeAll(async () => {
db = await dbInit('event_api_serial', getLogger); db = await dbInit('event_api_serial', getLogger);
app = await setupAppWithCustomConfig(db.stores, { app = await setupAppWithCustomConfig(db.stores, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
eventService = createEventsService(db.rawDatabase, config); eventService = createEventsService(db.rawDatabase, config);

View File

@ -89,9 +89,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -15,9 +15,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -20,9 +20,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -39,9 +39,7 @@ beforeAll(async () => {
app = await setupAppWithCustomAuth(stores, preHook, { app = await setupAppWithCustomAuth(stores, preHook, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
}); });

View File

@ -22,9 +22,7 @@ beforeAll(async () => {
stores, stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -17,9 +17,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -16,9 +16,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -17,9 +17,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -17,7 +17,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
enableLegacyVariants: false, enableLegacyVariants: false,
}, },
}, },

View File

@ -18,7 +18,6 @@ beforeAll(async () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
enableLegacyVariants: true, enableLegacyVariants: true,
}, },
}, },

View File

@ -39,9 +39,7 @@ beforeAll(async () => {
app = await setupAppWithCustomAuth(stores, preHook, { app = await setupAppWithCustomAuth(stores, preHook, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
}); });

View File

@ -12,9 +12,7 @@ beforeAll(async () => {
db = await dbInit('strategy_api_serial', getLogger); db = await dbInit('strategy_api_serial', getLogger);
app = await setupAppWithCustomConfig(db.stores, { app = await setupAppWithCustomConfig(db.stores, {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });
await db.stores.strategyStore.createStrategy({ await db.stores.strategyStore.createStrategy({

View File

@ -14,9 +14,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -112,7 +112,6 @@ describe('User Admin API with email configuration', () => {
}, },
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
showUserDeviceCount: true, showUserDeviceCount: true,
}, },
}, },
@ -166,7 +165,6 @@ describe('User Admin API without email', () => {
{ {
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
showUserDeviceCount: true, showUserDeviceCount: true,
}, },
}, },

View File

@ -40,9 +40,7 @@ beforeAll(async () => {
app = await setupAppWithCustomConfig(stores, { app = await setupAppWithCustomConfig(stores, {
enterpriseVersion: 'enterprise', enterpriseVersion: 'enterprise',
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}); });

View File

@ -24,9 +24,7 @@ beforeAll(async () => {
type: 'none', type: 'none',
}, },
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -21,9 +21,7 @@ beforeAll(async () => {
db.stores, db.stores,
{ {
experimental: { experimental: {
flags: { flags: {},
strictSchemaValidation: true,
},
}, },
}, },
db.rawDatabase, db.rawDatabase,

View File

@ -57,7 +57,6 @@ async function setup({
}, },
experimental: { experimental: {
flags: { flags: {
strictSchemaValidation: true,
etagVariant: { etagVariant: {
name: etagVariant, name: etagVariant,
enabled: etagVariant !== undefined, enabled: etagVariant !== undefined,

View File

@ -387,7 +387,6 @@ async function createApp(
experimental: { experimental: {
...(customOptions?.experimental ?? {}), ...(customOptions?.experimental ?? {}),
flags: { flags: {
strictSchemaValidation: true,
...(customOptions?.experimental?.flags ?? {}), ...(customOptions?.experimental?.flags ?? {}),
}, },
}, },
@ -443,7 +442,6 @@ export async function setupAppWithoutSupertest(
experimental: { experimental: {
...(customOptions?.experimental ?? {}), ...(customOptions?.experimental ?? {}),
flags: { flags: {
strictSchemaValidation: true,
...(customOptions?.experimental?.flags ?? {}), ...(customOptions?.experimental?.flags ?? {}),
}, },
}, },