Skip to content

Commit

Permalink
chore: mark deprecations with version (#7218)
Browse files Browse the repository at this point in the history
Makes some deprecation messages in open API clearer around which version
they were deprecated in so that they can be removed in v7
  • Loading branch information
sighphyre authored May 30, 2024
1 parent c932d2a commit d6dc2b4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/client-application-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const clientApplicationSchema = {
example: 'unleash-client-java:7.0.0',
},
environment: {
description: `The SDK's configured 'environment' property. Deprecated. This property does **not** control which Unleash environment the SDK gets toggles for. To control Unleash environments, use the SDKs API key.`,
description: `The SDK's configured 'environment' property. This property was deprecated in v5. This property does **not** control which Unleash environment the SDK gets toggles for. To control Unleash environments, use the SDKs API key.`,
deprecated: true,
type: 'string',
example: 'development',
Expand Down
4 changes: 2 additions & 2 deletions src/lib/openapi/spec/client-features-query-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const clientFeaturesQuerySchema = {
type: 'string',
},
description:
'Features that are part of these projects are included in this response. (DEPRECATED) - Handled by API tokens',
'Features that are part of these projects are included in this response. This is now handled by API tokens and was marked as deprecated in v5',
example: ['new.payment.flow'],
deprecated: true,
},
Expand All @@ -36,7 +36,7 @@ export const clientFeaturesQuerySchema = {
environment: {
type: 'string',
description:
'Strategies for the feature flag configured for this environment are included. (DEPRECATED) - Handled by API tokens',
'Strategies for the feature flag configured for this environment are included. This is now handled by API tokens and was marked as deprecated in v5',
deprecated: true,
},
inlineSegmentConstraints: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/create-api-token-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const usernameSchema = {
deprecated: true,
type: 'string',
description:
'The name of the token. This property is deprecated. Use `tokenName` instead.',
'The name of the token. This property was deprecated in v5. Use `tokenName` instead.',
example: 'token-64523',
},
},
Expand Down
5 changes: 3 additions & 2 deletions src/lib/openapi/spec/feature-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const featureSchema = {
deprecated: true,
example: '2023-01-28T16:21:39.975Z',
description:
'The date when metrics where last collected for the feature. This field is deprecated, use the one in featureEnvironmentSchema',
'The date when metrics where last collected for the feature. This field was deprecated in v5, use the one in featureEnvironmentSchema',
},
environments: {
type: 'array',
Expand All @@ -110,7 +110,8 @@ export const featureSchema = {
items: {
type: 'object',
},
description: 'This is a legacy field that will be deprecated',
description:
'This was deprecated in v5 and will be removed in a future major version',
deprecated: true,
},
tags: {
Expand Down
7 changes: 4 additions & 3 deletions src/lib/openapi/spec/feature-search-response-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const featureSearchResponseSchema = {
deprecated: true,
example: '2023-01-28T16:21:39.975Z',
description:
'The date when metrics where last collected for the feature. This field is deprecated, use the one in featureEnvironmentSchema',
'The date when metrics where last collected for the feature. This field was deprecated in v5 and will be removed in a future release, use the one in featureEnvironmentSchema',
},
environments: {
type: 'array',
Expand All @@ -124,15 +124,16 @@ export const featureSearchResponseSchema = {
items: {
$ref: '#/components/schemas/variantSchema',
},
description: 'The list of feature variants',
description:
'The list of feature variants. This field was deprecated in v5',
deprecated: true,
},
strategies: {
type: 'array',
items: {
type: 'object',
},
description: 'This is a legacy field that will be deprecated',
description: 'This is a legacy field that was deprecated in v5',
deprecated: true,
},
tags: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/user-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const userSchema = {
},
isAPI: {
description:
'(Deprecated): Used internally to know which operations the user should be allowed to perform',
'Deprecated in v5. Used internally to know which operations the user should be allowed to perform',
type: 'boolean',
example: true,
deprecated: true,
Expand Down

0 comments on commit d6dc2b4

Please sign in to comment.