From 3a373864499a7554c0d73a45b3d285031ef73a5b Mon Sep 17 00:00:00 2001 From: David Leek Date: Tue, 13 May 2025 14:13:15 +0200 Subject: [PATCH] chore: undeprecate custom strategies (#9939) --- src/lib/routes/admin-api/strategy.ts | 3 +-- website/docs/reference/activation-strategies.md | 10 ++++------ website/docs/reference/custom-activation-strategies.md | 4 ---- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/lib/routes/admin-api/strategy.ts b/src/lib/routes/admin-api/strategy.ts index b025fb150c..158efd75f0 100644 --- a/src/lib/routes/admin-api/strategy.ts +++ b/src/lib/routes/admin-api/strategy.ts @@ -122,12 +122,11 @@ class StrategyController extends Controller { permission: CREATE_STRATEGY, middleware: [ openApiService.validPath({ - deprecated: true, tags: ['Strategies'], operationId: 'createStrategy', summary: 'Create a strategy', description: - 'Creates a custom strategy type based on the supplied data. Custom strategies are deprecated and should not be used. Prefer using built in strategies with constraints instead.', + 'Creates a custom strategy type based on the supplied data.', requestBody: createRequestSchema('createStrategySchema'), responses: { 201: resourceCreatedResponseSchema('strategySchema'), diff --git a/website/docs/reference/activation-strategies.md b/website/docs/reference/activation-strategies.md index bf02437c24..cf9a146ac7 100644 --- a/website/docs/reference/activation-strategies.md +++ b/website/docs/reference/activation-strategies.md @@ -158,14 +158,12 @@ If the constraint uses a standard Unleash context field, set the context field t Unleash SDKs expect all context values to be strings. If you use an operator that acts on non-string values, such as [numeric operators](#numeric-operators) or [date and time operators](#date-and-time-operators), the SDKs attempt to convert the string into the expected type. If the conversion fails, the constraint evaluates to `false`. +## Custom activation strategies + +[Custom activation strategies](/reference/custom-activation-strategies) + ## Predefined strategy types :::caution [Predefined strategy types](/reference/predefined-strategy-types), such as UserIDs, IPs, and Hosts are a legacy implementation. Please use the default strategy with constraints to achieve your desired targeting. ::: - -## Custom activation strategies - -:::caution -[Custom activation strategies](/reference/custom-activation-strategies) are deprecated. Please use the default strategy with constraints. -::: \ No newline at end of file diff --git a/website/docs/reference/custom-activation-strategies.md b/website/docs/reference/custom-activation-strategies.md index e32ef5ef6a..0bc3d4ffbc 100644 --- a/website/docs/reference/custom-activation-strategies.md +++ b/website/docs/reference/custom-activation-strategies.md @@ -2,10 +2,6 @@ title: Custom Activation Strategies --- -:::caution -[Custom activation strategies](/reference/custom-activation-strategies) are deprecated. Please use the [default activation strategy](/reference/activation-strategies) with constraints. -::: - **Custom activation strategies** let you define your own activation strategies to use with Unleash. When the [built-in activation strategies](../reference/activation-strategies.md) aren't enough, custom activation strategies are there to provide you with the flexibility you need. Custom activation strategies work exactly like the built-in activation strategies when working in the admin UI.