Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure features documentation #8394

Merged
merged 21 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Check out [the CONTRIBUTING.md file](./CONTRIBUTING.md) for contribution guideli
- Organise feature flags by [feature flag tags](https://docs.getunleash.io/reference/tags)
- [Canary releases / gradual rollouts](https://docs.getunleash.io/reference/activation-strategies#gradual-rollout)
- Targeted releases: release features to specific [users](https://docs.getunleash.io/reference/activation-strategies#userids), [IPs](https://docs.getunleash.io/reference/activation-strategies#ips), or [hostnames](https://docs.getunleash.io/reference/activation-strategies#hostnames)
- [Kill switches](https://docs.getunleash.io/reference/feature-toggle-types#feature-toggle-types)
- [Kill switches](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types)
- [A/B testing](https://docs.getunleash.io/feature-flag-tutorials/use-cases/a-b-testing)
- 2 [environments](https://docs.getunleash.io/reference/environments)
- Out-of-the-box integrations with popular tools ([Slack](https://docs.getunleash.io/addons/slack), [Microsoft Teams](https://docs.getunleash.io/addons/teams), [Datadog](https://docs.getunleash.io/addons/datadog)) + integrate with anything with [webhooks](https://docs.getunleash.io/addons/webhook)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const DependenciesUpgradeAlert = () => {
const DependenciesDocsLink = () => {
return (
<a
href='https://docs.getunleash.io/reference/dependent-features#client-sdk-support'
href='https://docs.getunleash.io/reference/feature-toggles#feature-flag-dependencies'
target='_blank'
rel='noreferrer'
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/component/feature/EditFeature/EditFeature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const EditFeature = () => {
title='Edit Feature flag'
description='Feature flags support different use cases, each with their own specific needs such as simple static routing or more complex routing.
The feature flag is disabled when created and you decide when to enable'
documentationLink='https://docs.getunleash.io/reference/feature-toggle-types'
documentationLink='https://docs.getunleash.io/reference/feature-toggles#feature-flag-types'
documentationLinkLabel='Feature flag types documentation'
formatApiCode={formatApiCode}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
: `Edit flag type: ${featureType?.name}`
}
description={featureType?.description || ''}
documentationLink='https://docs.getunleash.io/reference/feature-toggle-types'
documentationLink='https://docs.getunleash.io/reference/feature-toggles#feature-flag-types'
documentationLinkLabel='Feature flag types documentation'
formatApiCode={formatApiCode}
>
Expand All @@ -151,7 +151,7 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
</p>
<br />
<a
href='https://docs.getunleash.io/reference/feature-toggle-types#expected-lifetime'
href='https://docs.getunleash.io/reference/feature-toggles#expected-lifetime'
target='_blank'
rel='noreferrer'
>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/clientFeatureSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ClientFeatureSchema {
stale?: boolean;
/** Evaluation strategies for this flag. Each entry in this list will be evaluated and ORed together */
strategies?: FeatureStrategySchema[];
/** 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 */
/** What kind of feature flag is this. Refer to the documentation on [feature flag types](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types) for more information */
type?: string;
/**
* [Variants](https://docs.getunleash.io/reference/feature-toggle-variants#what-are-variants) configured for this flag
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/createFeatureSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ export interface CreateFeatureSchema {
name: string;
/** Tags to add to the feature. */
tags?: TagSchema[];
/** The feature flag'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-toggles#feature-flag-types). One of experiment, kill-switch, release, operational, or permission */
type?: CreateFeatureSchemaType;
}
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/createFeatureSchemaType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/**
* The feature flag'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-toggles#feature-flag-types). One of experiment, kill-switch, release, operational, or permission
*/
export type CreateFeatureSchemaType =
(typeof CreateFeatureSchemaType)[keyof typeof CreateFeatureSchemaType];
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/featureTypeSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/**
* A [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).
* A [feature flag type](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types.
*/
export interface FeatureTypeSchema {
/** A description of what this feature flag type is intended to be used for. */
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/featureTypesSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { FeatureTypeSchema } from './featureTypeSchema';
import type { FeatureTypesSchemaVersion } from './featureTypesSchemaVersion';

/**
* A list of [feature flag 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-toggles#feature-flag-types) and the schema version used to represent those feature types.
*/
export interface FeatureTypesSchema {
/** The list of feature flag types. */
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/openapi/models/updateFeatureSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { UpdateFeatureSchemaType } from './updateFeatureSchemaType';
* Data used for updating a feature flag
*/
export interface UpdateFeatureSchema {
/** 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 */
/** If `true` the feature flag will be moved to the [archive](https://docs.getunleash.io/reference/feature-toggles#archive-a-feature-flag) with a property `archivedAt` set to current time */
archived?: boolean;
/** Detailed description of the feature */
description?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

/**
* Data used when updating the lifetime of a [feature flag 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-toggles#feature-flag-types).
*/
export interface UpdateFeatureTypeLifetimeSchema {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class ArchiveController extends Controller {
tags: ['Archive'],
summary: 'Get archived features',
description:
'Retrieve a list of all [archived feature flags](https://docs.getunleash.io/reference/archived-toggles).',
'Retrieve a list of all [archived feature flags](https://docs.getunleash.io/reference/feature-toggles#archive-a-feature-flag).',
operationId: 'getArchivedFeatures',
responses: {
200: createResponseSchema('archivedFeaturesSchema'),
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/client-feature-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const clientFeatureSchema = {
type: {
type: 'string',
description:
'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',
'What kind of feature flag is this. Refer to the documentation on [feature flag types](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types) for more information',
example: 'release',
},
description: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/create-feature-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const createFeatureSchema = {
],
example: 'release',
description:
"The feature flag'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-toggles#feature-flag-types). One of experiment, kill-switch, release, operational, or permission",
},
description: {
type: 'string',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/feature-type-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const featureTypeSchema = {
$id: '#/components/schemas/featureTypeSchema',
type: 'object',
description:
'A [feature flag type](https://docs.getunleash.io/reference/feature-toggle-types).',
'A [feature flag type](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types).',
additionalProperties: false,
required: ['id', 'name', 'description', 'lifetimeDays'],
properties: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/feature-types-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const featureTypesSchema = {
type: 'object',
additionalProperties: false,
description:
'A list of [feature flag 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-toggles#feature-flag-types) and the schema version used to represent those feature types.',
required: ['version', 'types'],
properties: {
version: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/spec/update-feature-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const updateFeatureSchema = {
type: 'boolean',
example: true,
description:
'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',
'If `true` the feature flag will be moved to the [archive](https://docs.getunleash.io/reference/feature-toggles#archive-a-feature-flag) with a property `archivedAt` set to current time',
},
impressionData: {
type: 'boolean',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const updateFeatureTypeLifetimeSchema = {
type: 'object',
required: ['lifetimeDays'],
description:
'Data used when updating the lifetime of a [feature flag 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-toggles#feature-flag-types).',
properties: {
lifetimeDays: {
description:
Expand Down
2 changes: 1 addition & 1 deletion src/lib/openapi/util/openapi-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const OPENAPI_TAGS = [
{
name: 'Feature Types',
description:
'Manage [feature flag types](https://docs.getunleash.io/reference/feature-toggle-types).',
'Manage [feature flag types](https://docs.getunleash.io/reference/feature-toggles#feature-flag-types).',
},
{
name: 'Features',
Expand Down
2 changes: 1 addition & 1 deletion src/lib/routes/admin-api/feature-type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class FeatureTypeController extends Controller {
tags: ['Feature Types'],
operationId: 'updateFeatureTypeLifetime',
summary: 'Update feature type lifetime',
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.
description: `Updates the lifetime configuration for the specified [feature flag type](https://docs.getunleash.io/reference/feature-toggles#feature-flag-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 flag type's expected lifetime is changed, this will also cause any feature flags of this type to be reevaluated for potential staleness.`,
responses: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ In the projects view, the Unleash platform shows a list of feature flags that yo

Next, you will create a feature flag on the platform and turn it on for your app.

Flags can be used with different purposes and we consider experimentation important enough to have its own flag type. Experimentation flags have a lifetime expectancy suited to let you run an experiment and gather enough data to know whether it was a success or not. Learn more about [feature flag types](/reference/feature-toggle-types) in our documentation.
Flags can be used with different purposes and we consider experimentation important enough to have its own flag type. Experimentation flags have a lifetime expectancy suited to let you run an experiment and gather enough data to know whether it was a success or not. Learn more about [feature flag types](/reference/feature-toggles#feature-flag-types) in our documentation.

The feature flag we are creating is considered an ‘Experimentation’ flag type. The project will be ‘Default’ or the named project in which you are working in for the purpose of this tutorial. As the number of feature flags grows, you can organize them in your projects.

Expand Down
28 changes: 0 additions & 28 deletions website/docs/how-to/how-to-add-feature-flag-naming-patterns.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion website/docs/how-to/how-to-environment-import-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ On the project-level these items are exported:

* [the feature itself](/reference/feature-toggles.mdx)
* [feature tags](/reference/tags.md)
* [feature dependencies](/reference/dependent-features.md)
* [feature dependencies](/reference/feature-toggles#feature-flag-dependencies)

On the environment-level, these items are exported for the chosen environment:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ This endpoint accepts the following flag options:
| `name` | Yes | The name of the feature flag. | `"my-feature-flag"` |
| `description` | No | The feature flag's description. Defaults to an empty string. | `"Turn my feature on!"` |
| `impressionData` | No | Whether to enable [impression data](/reference/impression-data.md) for this flag. Defaults to `false.` | `true` |
| `type` | No | The [type of flag](/reference/feature-toggle-types.md) you want to create. Defaults to `"release"` | `"release"` |
| `type` | No | The [type of flag](/reference/feature-toggles#feature-flag-types) you want to create. Defaults to `"release"` | `"release"` |


**Example Query**
Expand Down
36 changes: 0 additions & 36 deletions website/docs/reference/archived-toggles.md

This file was deleted.

Loading
Loading