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

Generated sidebar order is not as expected #199

Closed
thomasheartman opened this issue Aug 10, 2022 · 9 comments
Closed

Generated sidebar order is not as expected #199

thomasheartman opened this issue Aug 10, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@thomasheartman
Copy link

thomasheartman commented Aug 10, 2022

Describe the bug

When using this package to generate a sidebar from an openapi spec (grouping by tags), the order of the items in the sidebar does not match the order of the tags in the spec, nor are they listed alphabetically (or in some other, easily recognizable format)

Note: It may be that I've just missed the setting for this, but I couldn't find anything relating to 'sorting' in the readme. If this can be done today, please point me to the right place in the docs ☺️

Expected behavior

The generated sidebar should have the tags listed in one of three ways:

  1. the same order as they are defined at the root level of a spec
  2. alphabetically
  3. User-configurable (via a custom function or something else)

Current behavior

The order appears random.

Possible solution

I haven't had a look at the code yet, so I don't know what causes it, but if the code is asynchronous, that may be a cause. I suggest sorting the sidebar before finishing up. I would expect one of the three options mentioned above.

Steps to reproduce

  1. Use this spec (it's long)
Spec with tags
{
  "openapi": "3.0.3",
  "servers": [
    {
      "url": "http://localhost:4242"
    }
  ],
  "info": {
    "title": "Unleash API",
    "version": "4.14.0"
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    },
    "schemas": {
      "addonParameterSchema": {
        "type": "object",
        "required": [
          "name",
          "displayName",
          "type",
          "required",
          "sensitive"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "placeholder": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          }
        }
      },
      "addonSchema": {
        "type": "object",
        "required": [
          "provider",
          "enabled",
          "parameters",
          "events"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "provider": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "parameters": {
            "type": "object",
            "additionalProperties": true
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "environments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "addonsSchema": {
        "type": "object",
        "required": [
          "addons",
          "providers"
        ],
        "properties": {
          "addons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/addonSchema"
            }
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/addonTypeSchema"
            }
          }
        }
      },
      "addonTypeSchema": {
        "type": "object",
        "required": [
          "name",
          "displayName",
          "documentationUrl",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "documentationUrl": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tagTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagTypeSchema"
            }
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/addonParameterSchema"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "apiTokenSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "username",
          "type"
        ],
        "properties": {
          "secret": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "client, admin."
          },
          "environment": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "seenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "apiTokensSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "tokens"
        ],
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/apiTokenSchema"
            }
          }
        }
      },
      "applicationSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "appName"
        ],
        "properties": {
          "appName": {
            "type": "string"
          },
          "sdkVersion": {
            "type": "string"
          },
          "strategies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          },
          "announced": {
            "type": "boolean"
          }
        }
      },
      "applicationsSchema": {
        "type": "object",
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/applicationSchema"
            }
          }
        }
      },
      "bootstrapUiSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "uiConfig",
          "user",
          "email",
          "context",
          "featureTypes",
          "tagTypes",
          "strategies",
          "projects"
        ],
        "properties": {
          "uiConfig": {
            "$ref": "#/components/schemas/uiConfigSchema"
          },
          "user": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "number"
              },
              "isAPI": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "username": {
                "type": "string"
              },
              "imageUrl": {
                "type": "string"
              },
              "inviteLink": {
                "type": "string"
              },
              "loginAttempts": {
                "type": "number"
              },
              "emailSent": {
                "type": "boolean"
              },
              "rootRole": {
                "type": "number"
              },
              "seenAt": {
                "type": "string",
                "format": "date-time",
                "nullable": true
              },
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "permissions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/permissionSchema"
                }
              }
            }
          },
          "email": {
            "type": "boolean"
          },
          "context": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/contextFieldSchema"
            }
          },
          "featureTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureTypeSchema"
            }
          },
          "tagTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagTypeSchema"
            }
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/strategySchema"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/projectSchema"
            }
          }
        }
      },
      "changePasswordSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "token",
          "password"
        ],
        "properties": {
          "token": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "clientApplicationSchema": {
        "type": "object",
        "required": [
          "appName",
          "interval",
          "started",
          "strategies"
        ],
        "properties": {
          "appName": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "sdkVersion": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "interval": {
            "type": "number"
          },
          "started": {
            "oneOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "number"
              }
            ]
          },
          "strategies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "clientFeatureSchema": {
        "type": "object",
        "required": [
          "name",
          "enabled"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "stale": {
            "type": "boolean"
          },
          "impressionData": {
            "type": "boolean",
            "nullable": true
          },
          "project": {
            "type": "string"
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureStrategySchema"
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/clientVariantSchema"
            },
            "nullable": true
          }
        }
      },
      "clientFeaturesQuerySchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "tag": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "project": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "namePrefix": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "inlineSegmentConstraints": {
            "type": "boolean"
          }
        }
      },
      "clientFeaturesSchema": {
        "type": "object",
        "required": [
          "version",
          "features"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/clientFeatureSchema"
            }
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/segmentSchema"
            }
          },
          "query": {
            "$ref": "#/components/schemas/clientFeaturesQuerySchema"
          }
        }
      },
      "clientMetricsSchema": {
        "type": "object",
        "required": [
          "appName",
          "bucket"
        ],
        "properties": {
          "appName": {
            "type": "string"
          },
          "instanceId": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "bucket": {
            "type": "object",
            "required": [
              "start",
              "stop",
              "toggles"
            ],
            "properties": {
              "start": {
                "$ref": "#/components/schemas/dateSchema"
              },
              "stop": {
                "$ref": "#/components/schemas/dateSchema"
              },
              "toggles": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "yes": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "no": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "variants": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "clientVariantSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "weight"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          },
          "weightType": {
            "type": "string"
          },
          "stickiness": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "required": [
              "type",
              "value"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          }
        }
      },
      "cloneFeatureSchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "replaceGroupId": {
            "type": "boolean"
          }
        }
      },
      "constraintSchema": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "contextName",
          "operator"
        ],
        "description": "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)",
        "properties": {
          "contextName": {
            "description": "The name of the context field that this constraint should apply to.",
            "example": "appName",
            "type": "string"
          },
          "operator": {
            "description": "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/advanced/strategy_constraints#strategy-constraint-operators).",
            "type": "string",
            "enum": [
              "NOT_IN",
              "IN",
              "STR_ENDS_WITH",
              "STR_STARTS_WITH",
              "STR_CONTAINS",
              "NUM_EQ",
              "NUM_GT",
              "NUM_GTE",
              "NUM_LT",
              "NUM_LTE",
              "DATE_AFTER",
              "DATE_BEFORE",
              "SEMVER_EQ",
              "SEMVER_GT",
              "SEMVER_LT"
            ]
          },
          "caseInsensitive": {
            "description": "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).",
            "type": "boolean",
            "default": false
          },
          "inverted": {
            "description": "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.",
            "type": "boolean",
            "default": false
          },
          "values": {
            "type": "array",
            "description": "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.",
            "items": {
              "type": "string"
            }
          },
          "value": {
            "description": "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.",
            "type": "string"
          }
        }
      },
      "contextFieldSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "stickiness": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "legalValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/legalValueSchema"
            }
          }
        }
      },
      "contextFieldsSchema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/contextFieldSchema"
        }
      },
      "createApiTokenSchema": {
        "type": "object",
        "required": [
          "username",
          "type"
        ],
        "properties": {
          "secret": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "client, admin."
          },
          "environment": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "createFeatureSchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "impressionData": {
            "type": "boolean"
          }
        }
      },
      "createFeatureStrategySchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "sortOrder": {
            "type": "number"
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/constraintSchema"
            }
          },
          "parameters": {
            "$ref": "#/components/schemas/parametersSchema"
          }
        }
      },
      "createUserSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "rootRole"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "rootRole": {
            "type": "number"
          },
          "sendEmail": {
            "type": "boolean"
          }
        }
      },
      "dateSchema": {
        "oneOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "number"
          }
        ]
      },
      "emailSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string"
          }
        }
      },
      "environmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "type",
          "enabled"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "protected": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "number"
          }
        }
      },
      "environmentsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "environments"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/environmentSchema"
            }
          }
        }
      },
      "eventSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "createdAt",
          "type",
          "createdBy"
        ],
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "environment": {
            "type": "string",
            "nullable": true
          },
          "project": {
            "type": "string",
            "nullable": true
          },
          "featureName": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "object",
            "nullable": true
          },
          "preData": {
            "type": "object",
            "nullable": true
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagSchema"
            },
            "nullable": true
          }
        }
      },
      "eventsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "events"
        ],
        "properties": {
          "version": {
            "type": "integer",
            "minimum": 1
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/eventSchema"
            }
          }
        }
      },
      "featureEnvironmentMetricsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "environment",
          "timestamp",
          "yes",
          "no"
        ],
        "properties": {
          "featureName": {
            "type": "string"
          },
          "appName": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "yes": {
            "type": "number"
          },
          "no": {
            "type": "number"
          }
        }
      },
      "featureEnvironmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "enabled"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "strategies": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "featureName",
                "projectId",
                "environment",
                "strategyName",
                "constraints",
                "parameters"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "featureName": {
                  "type": "string"
                },
                "projectId": {
                  "type": "string"
                },
                "environment": {
                  "type": "string"
                },
                "strategyName": {
                  "type": "string"
                },
                "sortOrder": {
                  "type": "number"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "constraints": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/constraintSchema"
                  }
                },
                "parameters": {
                  "$ref": "#/components/schemas/parametersSchema"
                }
              }
            }
          }
        }
      },
      "featureEventsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "toggleName",
          "events"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "toggleName": {
            "type": "string"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/eventSchema"
            }
          }
        }
      },
      "featureMetricsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "maturity",
          "data"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "maturity": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureEnvironmentMetricsSchema"
            }
          }
        }
      },
      "featureSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "archived": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "stale": {
            "type": "boolean"
          },
          "impressionData": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "archivedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastSeenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/environmentSchema"
            }
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureStrategySchema"
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/variantSchema"
            }
          }
        }
      },
      "featuresSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "features"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureSchema"
            }
          }
        }
      },
      "featureStrategySchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "sortOrder": {
            "type": "number"
          },
          "segments": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/constraintSchema"
            }
          },
          "parameters": {
            "$ref": "#/components/schemas/parametersSchema"
          }
        }
      },
      "featureStrategySegmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "segmentId",
          "featureStrategyId"
        ],
        "properties": {
          "segmentId": {
            "type": "integer"
          },
          "featureStrategyId": {
            "type": "string"
          }
        }
      },
      "featureTagSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "featureName",
          "tagValue"
        ],
        "properties": {
          "featureName": {
            "type": "string"
          },
          "tagType": {
            "type": "string"
          },
          "tagValue": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "featureTypeSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "description",
          "lifetimeDays"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "lifetimeDays": {
            "type": "number",
            "nullable": true
          }
        }
      },
      "featureTypesSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "types"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureTypeSchema"
            }
          }
        }
      },
      "featureUsageSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "maturity",
          "featureName",
          "lastHourUsage",
          "seenApplications"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "maturity": {
            "type": "string"
          },
          "featureName": {
            "type": "string"
          },
          "lastHourUsage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureEnvironmentMetricsSchema"
            }
          },
          "seenApplications": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "featureVariantsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "variants"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/variantSchema"
            }
          }
        }
      },
      "feedbackSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "userId": {
            "type": "number"
          },
          "feedbackId": {
            "type": "string"
          },
          "neverShow": {
            "type": "boolean"
          },
          "given": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "groupSchema": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "name"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/groupUserModelSchema"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "groupsSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/groupSchema"
            }
          }
        }
      },
      "groupUserModelSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "role",
          "user"
        ],
        "properties": {
          "joinedAt": {
            "type": "string",
            "format": "date-time"
          },
          "role": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/userSchema"
          }
        }
      },
      "healthCheckSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "health"
        ],
        "properties": {
          "health": {
            "type": "string",
            "enum": [
              "GOOD",
              "BAD"
            ]
          }
        }
      },
      "healthOverviewSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "name"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "members": {
            "type": "number"
          },
          "health": {
            "type": "number"
          },
          "environments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureSchema"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "healthReportSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "name",
          "potentiallyStaleCount",
          "activeCount",
          "staleCount"
        ],
        "properties": {
          "version": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "members": {
            "type": "number"
          },
          "health": {
            "type": "number"
          },
          "environments": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureSchema"
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "potentiallyStaleCount": {
            "type": "number"
          },
          "activeCount": {
            "type": "number"
          },
          "staleCount": {
            "type": "number"
          }
        }
      },
      "idSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "legalValueSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "loginSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string"
          }
        }
      },
      "meSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user",
          "permissions",
          "feedback",
          "splash"
        ],
        "properties": {
          "user": {
            "$ref": "#/components/schemas/userSchema"
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/permissionSchema"
            }
          },
          "feedback": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/feedbackSchema"
            }
          },
          "splash": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        }
      },
      "nameSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "overrideSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contextName",
          "values"
        ],
        "properties": {
          "contextName": {
            "type": "string"
          },
          "values": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "parametersSchema": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "passwordSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          },
          "confirmPassword": {
            "type": "string"
          }
        }
      },
      "patchesSchema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/patchSchema"
        }
      },
      "patchSchema": {
        "type": "object",
        "required": [
          "path",
          "op"
        ],
        "properties": {
          "path": {
            "type": "string"
          },
          "op": {
            "type": "string",
            "enum": [
              "add",
              "remove",
              "replace",
              "copy",
              "move"
            ]
          },
          "from": {
            "type": "string"
          },
          "value": {}
        }
      },
      "permissionSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "permission"
        ],
        "properties": {
          "permission": {
            "type": "string"
          },
          "project": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          }
        }
      },
      "playgroundFeatureSchema": {
        "description": "A simplified feature toggle model intended for the Unleash playground.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "projectId",
          "isEnabled",
          "isEnabledInCurrentEnvironment",
          "variant",
          "variants",
          "strategies"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "my-feature",
            "description": "The feature's name."
          },
          "projectId": {
            "type": "string",
            "example": "my-project",
            "description": "The ID of the project that contains this feature."
          },
          "strategies": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "result",
              "data"
            ],
            "properties": {
              "result": {
                "description": "The cumulative results of all the feature's strategies. Can be `true`,\n                                  `false`, or `unknown`.\n                                  This property will only be `unknown`\n                                  if one or more of the strategies can't be fully evaluated and the rest of the strategies\n                                  all resolve to `false`.",
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "unknown"
                    ]
                  }
                ]
              },
              "data": {
                "description": "The strategies that apply to this feature.",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/playgroundStrategySchema"
                }
              }
            }
          },
          "isEnabledInCurrentEnvironment": {
            "type": "boolean",
            "description": "Whether the feature is active and would be evaluated in the provided environment in a normal SDK context."
          },
          "isEnabled": {
            "description": "Whether this feature is enabled or not in the current environment.\n                          If a feature can't be fully evaluated (that is, `strategies.result` is `unknown`),\n                          this will be `false` to align with how client SDKs treat unresolved feature states.",
            "type": "boolean",
            "example": true
          },
          "variant": {
            "description": "The feature variant you receive based on the provided context or the _disabled\n                          variant_. If a feature is disabled or doesn't have any\n                          variants, you would get the _disabled variant_.\n                          Otherwise, you'll get one of thefeature's defined variants.",
            "type": "object",
            "additionalProperties": false,
            "required": [
              "name",
              "enabled"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "The variant's name. If there is no variant or if the toggle is disabled, this will be `disabled`",
                "example": "red-variant"
              },
              "enabled": {
                "type": "boolean",
                "description": "Whether the variant is enabled or not. If the feature is disabled or if it doesn't have variants, this property will be `false`"
              },
              "payload": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "type",
                  "value"
                ],
                "description": "An optional payload attached to the variant.",
                "properties": {
                  "type": {
                    "description": "The format of the payload.",
                    "type": "string",
                    "enum": [
                      "json",
                      "csv",
                      "string"
                    ]
                  },
                  "value": {
                    "type": "string",
                    "description": "The payload value stringified.",
                    "example": "{\"property\": \"value\"}"
                  }
                }
              }
            },
            "nullable": true,
            "example": {
              "name": "green",
              "enabled": true
            }
          },
          "variants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/variantSchema"
            }
          }
        }
      },
      "playgroundStrategySchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "result",
          "segments",
          "constraints",
          "parameters"
        ],
        "properties": {
          "name": {
            "description": "The strategy's name.",
            "type": "string"
          },
          "id": {
            "description": "The strategy's id.",
            "type": "string"
          },
          "result": {
            "description": "The strategy's evaluation result. If the strategy is a custom strategy that Unleash can't evaluate, `evaluationStatus` will be `unknown`. Otherwise, it will be `true` or `false`",
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "evaluationStatus",
                  "enabled"
                ],
                "properties": {
                  "evaluationStatus": {
                    "type": "string",
                    "description": "Signals that this strategy could not be evaluated. This is most likely because you're using a custom strategy that Unleash doesn't know about.",
                    "enum": [
                      "incomplete"
                    ]
                  },
                  "enabled": {
                    "description": "Whether this strategy resolves to `false` or if it might resolve to `true`. Because Unleash can't evaluate the strategy, it can't say for certain whether it will be `true`, but if you have failing constraints or segments, it _can_ determine that your strategy would be `false`.",
                    "anyOf": [
                      {
                        "type": "boolean",
                        "enum": [
                          false
                        ]
                      },
                      {
                        "type": "string",
                        "enum": [
                          "unknown"
                        ]
                      }
                    ]
                  }
                }
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "evaluationStatus",
                  "enabled"
                ],
                "properties": {
                  "evaluationStatus": {
                    "description": "Signals that this strategy was evaluated successfully.",
                    "type": "string",
                    "enum": [
                      "complete"
                    ]
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Whether this strategy evaluates to true or not."
                  }
                }
              }
            ]
          },
          "segments": {
            "type": "array",
            "description": "The strategy's segments and their evaluation results.",
            "items": {
              "$ref": "#/components/schemas/playgroundSegmentSchema"
            }
          },
          "constraints": {
            "type": "array",
            "description": "The strategy's constraints and their evaluation results.",
            "items": {
              "$ref": "#/components/schemas/playgroundConstraintSchema"
            }
          },
          "parameters": {
            "description": "The strategy's constraints and their evaluation results.",
            "example": {
              "myParam1": "param value"
            },
            "$ref": "#/components/schemas/parametersSchema"
          }
        }
      },
      "playgroundConstraintSchema": {
        "additionalProperties": false,
        "type": "object",
        "required": [
          "contextName",
          "operator",
          "result"
        ],
        "description": "A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/advanced/strategy_constraints)",
        "properties": {
          "contextName": {
            "description": "The name of the context field that this constraint should apply to.",
            "example": "appName",
            "type": "string"
          },
          "operator": {
            "description": "The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/advanced/strategy_constraints#strategy-constraint-operators).",
            "type": "string",
            "enum": [
              "NOT_IN",
              "IN",
              "STR_ENDS_WITH",
              "STR_STARTS_WITH",
              "STR_CONTAINS",
              "NUM_EQ",
              "NUM_GT",
              "NUM_GTE",
              "NUM_LT",
              "NUM_LTE",
              "DATE_AFTER",
              "DATE_BEFORE",
              "SEMVER_EQ",
              "SEMVER_GT",
              "SEMVER_LT"
            ]
          },
          "caseInsensitive": {
            "description": "Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive).",
            "type": "boolean",
            "default": false
          },
          "inverted": {
            "description": "Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa.",
            "type": "boolean",
            "default": false
          },
          "values": {
            "type": "array",
            "description": "The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values.",
            "items": {
              "type": "string"
            }
          },
          "value": {
            "description": "The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values.",
            "type": "string"
          },
          "result": {
            "description": "Whether this was evaluated as true or false.",
            "type": "boolean"
          }
        }
      },
      "playgroundSegmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "id",
          "constraints",
          "result"
        ],
        "properties": {
          "id": {
            "description": "The segment's id.",
            "type": "integer"
          },
          "name": {
            "description": "The name of the segment.",
            "example": "segment A",
            "type": "string"
          },
          "result": {
            "description": "Whether this was evaluated as true or false.",
            "type": "boolean"
          },
          "constraints": {
            "type": "array",
            "description": "The list of constraints in this segment.",
            "items": {
              "$ref": "#/components/schemas/playgroundConstraintSchema"
            }
          }
        }
      },
      "playgroundRequestSchema": {
        "description": "Data for the playground API to evaluate toggles",
        "type": "object",
        "required": [
          "environment",
          "context"
        ],
        "properties": {
          "environment": {
            "type": "string",
            "example": "development",
            "description": "The environment to evaluate toggles in."
          },
          "projects": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "my-project"
                ],
                "description": "A list of projects to check for toggles in."
              },
              {
                "type": "string",
                "enum": [
                  "*"
                ],
                "description": "Check toggles in all projects."
              }
            ]
          },
          "context": {
            "description": "The context to use when evaluating toggles",
            "$ref": "#/components/schemas/sdkContextSchema"
          }
        }
      },
      "playgroundResponseSchema": {
        "description": "The state of all features given the provided input.",
        "type": "object",
        "additionalProperties": false,
        "required": [
          "features",
          "input"
        ],
        "properties": {
          "input": {
            "description": "The given input used to evaluate the features.",
            "$ref": "#/components/schemas/playgroundRequestSchema"
          },
          "features": {
            "type": "array",
            "description": "The list of features that have been evaluated.",
            "items": {
              "$ref": "#/components/schemas/playgroundFeatureSchema"
            }
          }
        }
      },
      "projectEnvironmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "environment"
        ],
        "properties": {
          "environment": {
            "type": "string"
          }
        }
      },
      "projectSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "health": {
            "type": "number"
          },
          "featureCount": {
            "type": "number"
          },
          "memberCount": {
            "type": "number"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "projectsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "projects"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/projectSchema"
            }
          }
        }
      },
      "resetPasswordSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resetPasswordUrl"
        ],
        "properties": {
          "resetPasswordUrl": {
            "type": "string"
          }
        }
      },
      "roleSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "type",
          "name"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "type": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "sdkContextSchema": {
        "description": "The Unleash context as modeled in client SDKs",
        "type": "object",
        "additionalProperties": {
          "type": "string",
          "example": "top-level custom context value"
        },
        "required": [
          "appName"
        ],
        "properties": {
          "appName": {
            "type": "string",
            "minLength": 1,
            "example": "My cool application."
          },
          "currentTime": {
            "type": "string",
            "format": "date-time",
            "example": "2022-07-05T12:56:41+02:00"
          },
          "environment": {
            "type": "string",
            "deprecated": true
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "customContextField": "this is one!",
              "otherCustomField": "3"
            }
          },
          "remoteAddress": {
            "type": "string",
            "example": "192.168.1.1"
          },
          "sessionId": {
            "type": "string",
            "example": "b65e7b23-fec0-4814-a129-0e9861ef18fc"
          },
          "userId": {
            "type": "string",
            "example": "[email protected]"
          }
        }
      },
      "segmentSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "constraints"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/constraintSchema"
            }
          }
        }
      },
      "setStrategySortOrderSchema": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "id",
            "sortOrder"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "sortOrder": {
              "type": "number"
            }
          }
        }
      },
      "sortOrderSchema": {
        "type": "object",
        "additionalProperties": {
          "type": "number"
        }
      },
      "splashSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "userId",
          "splashId",
          "seen"
        ],
        "properties": {
          "userId": {
            "type": "number"
          },
          "splashId": {
            "type": "string"
          },
          "seen": {
            "type": "boolean"
          }
        }
      },
      "stateSchema": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "version"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "features": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureSchema"
            }
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/strategySchema"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagSchema"
            }
          },
          "tagTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagTypeSchema"
            }
          },
          "featureTags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureTagSchema"
            }
          },
          "projects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/projectSchema"
            }
          },
          "featureStrategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureStrategySchema"
            }
          },
          "featureEnvironments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureEnvironmentSchema"
            }
          },
          "environments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/environmentSchema"
            }
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/segmentSchema"
            }
          },
          "featureStrategySegments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/featureStrategySegmentSchema"
            }
          }
        }
      },
      "strategiesSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "strategies"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "strategies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/strategySchema"
            }
          }
        }
      },
      "strategySchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "displayName",
          "description",
          "editable",
          "deprecated",
          "parameters"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string"
          },
          "editable": {
            "type": "boolean"
          },
          "deprecated": {
            "type": "boolean"
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "tagSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "value",
          "type"
        ],
        "properties": {
          "value": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "tagsSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "tags"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagSchema"
            }
          }
        }
      },
      "tagTypeSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "tagTypesSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "tagTypes"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "tagTypes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tagTypeSchema"
            }
          }
        }
      },
      "tagWithVersionSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "tag"
        ],
        "properties": {
          "version": {
            "type": "integer"
          },
          "tag": {
            "$ref": "#/components/schemas/tagSchema"
          }
        }
      },
      "tokenUserSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "email",
          "token",
          "createdBy",
          "role"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "token": {
            "type": "string"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "$ref": "#/components/schemas/roleSchema"
          }
        }
      },
      "uiConfigSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "unleashUrl",
          "baseUriPath",
          "versionInfo"
        ],
        "properties": {
          "slogan": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "environment": {
            "type": "string"
          },
          "unleashUrl": {
            "type": "string"
          },
          "baseUriPath": {
            "type": "string"
          },
          "disablePasswordAuth": {
            "type": "boolean"
          },
          "segmentValuesLimit": {
            "type": "number"
          },
          "strategySegmentsLimit": {
            "type": "number"
          },
          "flags": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "authenticationType": {
            "type": "string",
            "enum": [
              "open-source",
              "demo",
              "enterprise",
              "hosted",
              "custom",
              "none"
            ]
          },
          "versionInfo": {
            "$ref": "#/components/schemas/versionSchema"
          }
        }
      },
      "updateApiTokenSchema": {
        "type": "object",
        "required": [
          "expiresAt"
        ],
        "properties": {
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "updateFeatureSchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "stale": {
            "type": "boolean"
          },
          "archived": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "impressionData": {
            "type": "boolean"
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/constraintSchema"
            }
          }
        }
      },
      "updateFeatureStrategySchema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "sortOrder": {
            "type": "number"
          },
          "constraints": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/constraintSchema"
            }
          },
          "parameters": {
            "$ref": "#/components/schemas/parametersSchema"
          }
        }
      },
      "updateTagTypeSchema": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "icon": {
            "type": "string"
          }
        }
      },
      "updateUserSchema": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "rootRole": {
            "type": "number"
          }
        }
      },
      "upsertContextFieldSchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "stickiness": {
            "type": "boolean"
          },
          "sortOrder": {
            "type": "number"
          },
          "legalValues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/legalValueSchema"
            }
          }
        }
      },
      "upsertStrategySchema": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "editable": {
            "type": "boolean"
          },
          "parameters": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "usersGroupsBaseSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/groupSchema"
            }
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/userSchema"
            }
          }
        }
      },
      "userSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "number"
          },
          "isAPI": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "inviteLink": {
            "type": "string"
          },
          "loginAttempts": {
            "type": "number"
          },
          "emailSent": {
            "type": "boolean"
          },
          "rootRole": {
            "type": "number"
          },
          "seenAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "usersSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "users"
        ],
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/userSchema"
            }
          },
          "rootRoles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/roleSchema"
            }
          }
        }
      },
      "usersSearchSchema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/userSchema"
        }
      },
      "validatePasswordSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          }
        }
      },
      "validateTagTypeSchema": {
        "type": "object",
        "required": [
          "valid",
          "tagType"
        ],
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "tagType": {
            "$ref": "#/components/schemas/tagTypeSchema"
          }
        }
      },
      "variantSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "weight",
          "weightType",
          "stickiness"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          },
          "weightType": {
            "type": "string"
          },
          "stickiness": {
            "type": "string"
          },
          "payload": {
            "type": "object",
            "required": [
              "type",
              "value"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            }
          },
          "overrides": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/overrideSchema"
            }
          }
        }
      },
      "variantsSchema": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/variantSchema"
        }
      },
      "versionSchema": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "current",
          "latest",
          "isLatest",
          "instanceId"
        ],
        "properties": {
          "current": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "oss": {
                "type": "string"
              },
              "enterprise": {
                "type": "string"
              }
            }
          },
          "latest": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "oss": {
                "type": "string"
              },
              "enterprise": {
                "type": "string"
              }
            }
          },
          "isLatest": {
            "type": "boolean"
          },
          "instanceId": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Addons",
      "description": "Create, update, and delete [Unleash addons](https://docs.getunleash.io/addons)."
    },
    {
      "name": "Admin UI",
      "description": "Configure the Unleash Admin UI."
    },
    {
      "name": "API tokens",
      "description": "Create, update, and delete [Unleash API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys)."
    },
    {
      "name": "Archive",
      "description": "Revive or permanently delete [archived feature toggles](https://docs.getunleash.io/advanced/archived_toggles)."
    },
    {
      "name": "Auth",
      "description": "Manage logins, passwords, etc."
    },
    {
      "name": "Client",
      "description": "Endpoints for [Unleash server-side clients](https://docs.getunleash.io/sdks)."
    },
    {
      "name": "Context",
      "description": "Create, update, and delete [context fields](https://docs.getunleash.io/user_guide/unleash_context) that Unleash is aware of."
    },
    {
      "name": "Environments",
      "description": "Create, update, delete, enable or disable [environments](https://docs.getunleash.io/user_guide/environments) for this Unleash instance."
    },
    {
      "name": "Events",
      "description": "Read events from this Unleash instance."
    },
    {
      "name": "Features",
      "description": "Create, update, and delete [features toggles](https://docs.getunleash.io/reference/feature-toggles)."
    },
    {
      "name": "Import/Export",
      "description": "[Import and export](https://docs.getunleash.io/deploy/import_export) the state of your Unleash instance."
    },
    {
      "name": "Metrics",
      "description": "Register, read, or delete metrics recorded by Unleash."
    },
    {
      "name": "Operational",
      "description": "Endpoints related to the operational status of this Unleash instance."
    },
    {
      "name": "Playground",
      "description": "Evaluate an Unleash context against your feature toggles."
    },
    {
      "name": "Projects",
      "description": "Create, update, and delete [Unleash projects](https://docs.getunleash.io/user_guide/projects)."
    },
    {
      "name": "Strategies",
      "description": "Create, update, delete, manage [custom strategies](https://docs.getunleash.io/advanced/custom_activation_strategy)."
    },
    {
      "name": "Tags",
      "description": "Create, update, and delete [tags and tag types](https://docs.getunleash.io/advanced/tags)."
    },
    {
      "name": "Users",
      "description": "Manage users and passwords."
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "tags": [
          "Operational"
        ],
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "healthCheckSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/healthCheckSchema"
                }
              }
            }
          },
          "500": {
            "description": "healthCheckSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/healthCheckSchema"
                }
              }
            }
          }
        }
      }
    },
    "/auth/simple/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "login",
        "requestBody": {
          "description": "loginSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/loginSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "userSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userSchema"
                }
              }
            }
          }
        }
      }
    },
    "/auth/reset/validate": {
      "get": {
        "tags": [
          "Auth"
        ],
        "operationId": "validateToken",
        "responses": {
          "200": {
            "description": "tokenUserSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tokenUserSchema"
                }
              }
            }
          }
        }
      }
    },
    "/auth/reset/password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "changePassword",
        "requestBody": {
          "description": "changePasswordSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/changePasswordSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/auth/reset/validate-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "validatePassword",
        "requestBody": {
          "description": "validatePasswordSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/validatePasswordSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/auth/reset/password-email": {
      "post": {
        "tags": [
          "Auth"
        ],
        "operationId": "sendResetPasswordEmail",
        "requestBody": {
          "description": "emailSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/emailSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/features": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getAllToggles",
        "responses": {
          "200": {
            "description": "featuresSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featuresSchema"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/api/admin/features/validate": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "validateFeature",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/features/{featureName}/tags": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "listTags",
        "responses": {
          "200": {
            "description": "tagsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "addTag",
        "requestBody": {
          "description": "tagSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tagSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "tagSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/features/{featureName}/tags/{type}/{value}": {
      "delete": {
        "tags": [
          "Features"
        ],
        "operationId": "removeTag",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/feature-types": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getAllFeatureTypes",
        "responses": {
          "200": {
            "description": "featureTypesSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureTypesSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/archive/features": {
      "get": {
        "tags": [
          "Archive"
        ],
        "operationId": "getArchivedFeatures",
        "responses": {
          "200": {
            "description": "featuresSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featuresSchema"
                }
              }
            }
          }
        },
        "deprecated": true
      }
    },
    "/api/admin/archive/features/{projectId}": {
      "get": {
        "tags": [
          "Archive"
        ],
        "operationId": "getArchivedFeaturesByProjectId",
        "responses": {
          "200": {
            "description": "featuresSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featuresSchema"
                }
              }
            }
          }
        },
        "deprecated": true,
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/archive/{featureName}": {
      "delete": {
        "tags": [
          "Archive"
        ],
        "operationId": "deleteFeature",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/archive/revive/{featureName}": {
      "post": {
        "tags": [
          "Archive"
        ],
        "operationId": "reviveFeature",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/strategies": {
      "get": {
        "tags": [
          "Strategies"
        ],
        "operationId": "getAllStrategies",
        "responses": {
          "200": {
            "description": "strategiesSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/strategiesSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Strategies"
        ],
        "operationId": "createStrategy",
        "requestBody": {
          "description": "upsertStrategySchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/upsertStrategySchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/strategies/{name}": {
      "get": {
        "tags": [
          "Strategies"
        ],
        "operationId": "getStrategy",
        "responses": {
          "200": {
            "description": "strategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/strategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Strategies"
        ],
        "operationId": "removeStrategy",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/strategies/{strategyName}": {
      "put": {
        "tags": [
          "Strategies"
        ],
        "operationId": "updateStrategy",
        "requestBody": {
          "description": "upsertStrategySchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/upsertStrategySchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "strategyName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/strategies/{strategyName}/deprecate": {
      "post": {
        "tags": [
          "Strategies"
        ],
        "operationId": "deprecateStrategy",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "strategyName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/strategies/{strategyName}/reactivate": {
      "post": {
        "tags": [
          "Strategies"
        ],
        "operationId": "reactivateStrategy",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "strategyName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/events": {
      "get": {
        "operationId": "getEvents",
        "tags": [
          "Events"
        ],
        "responses": {
          "200": {
            "description": "eventsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventsSchema"
                }
              }
            }
          },
          "401": {
            "description": "Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`."
          }
        },
        "parameters": [
          {
            "name": "project",
            "description": "The name of the project whose events you want to retrieve",
            "schema": {
              "type": "string"
            },
            "in": "query"
          }
        ],
        "description": "Returns **the last 100** from the Unleash instance when called without a query parameter. When called with a `project` parameter, returns **all events** for the specified project.\n\nIf the provided project does not exist, the list of events will be empty.",
        "summary": "Get the most recent events from the Unleash instance or all events related to a project."
      }
    },
    "/api/admin/events/{featureName}": {
      "get": {
        "operationId": "getEventsForToggle",
        "tags": [
          "Events"
        ],
        "responses": {
          "200": {
            "description": "featureEventsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureEventsSchema"
                }
              }
            }
          },
          "401": {
            "description": "Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`."
          }
        },
        "description": "Returns all events related to the specified feature toggle. If the feature toggle does not exist, the list of events will be empty.",
        "summary": "Get all events related to a specific feature toggle.",
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/playground": {
      "post": {
        "operationId": "getPlayground",
        "tags": [
          "Playground"
        ],
        "responses": {
          "200": {
            "description": "playgroundResponseSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/playgroundResponseSchema"
                }
              }
            }
          },
          "400": {
            "description": "The request data does not match what we expect."
          },
          "401": {
            "description": "Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`."
          }
        },
        "requestBody": {
          "description": "playgroundRequestSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/playgroundRequestSchema"
              }
            }
          }
        },
        "description": "Use the provided `context`, `environment`, and `projects` to evaluate toggles on this Unleash instance. Returns a list of all toggles that match the parameters and what they evaluate to. The response also contains the input parameters that were provided.",
        "summary": "Evaluate an Unleash context against a set of environments and projects."
      }
    },
    "/api/admin/metrics/applications/{appName}": {
      "post": {
        "tags": [
          "Metrics"
        ],
        "operationId": "createApplication",
        "responses": {
          "202": {
            "description": "This response has no body."
          }
        },
        "requestBody": {
          "description": "applicationSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/applicationSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "appName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Metrics"
        ],
        "operationId": "deleteApplication",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "appName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "tags": [
          "Metrics"
        ],
        "operationId": "getApplication",
        "responses": {
          "200": {
            "description": "applicationSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/applicationSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "appName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/metrics/applications": {
      "get": {
        "tags": [
          "Metrics"
        ],
        "operationId": "getApplications",
        "responses": {
          "200": {
            "description": "applicationsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/applicationsSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/client-metrics/features/{name}/raw": {
      "get": {
        "operationId": "getRawFeatureMetrics",
        "tags": [
          "Metrics"
        ],
        "responses": {
          "200": {
            "description": "featureMetricsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureMetricsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/client-metrics/features/{name}": {
      "get": {
        "operationId": "getFeatureUsageSummary",
        "tags": [
          "Metrics"
        ],
        "responses": {
          "200": {
            "description": "featureUsageSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureUsageSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/user": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "meSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/meSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/user/change-password": {
      "post": {
        "tags": [
          "Users"
        ],
        "operationId": "changeMyPassword",
        "requestBody": {
          "description": "passwordSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/passwordSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          },
          "400": {
            "description": "passwordMismatch"
          }
        }
      }
    },
    "/api/admin/ui-config": {
      "get": {
        "tags": [
          "Admin UI"
        ],
        "operationId": "getUIConfig",
        "responses": {
          "200": {
            "description": "uiConfigSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/uiConfigSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/ui-bootstrap": {
      "get": {
        "tags": [
          "Admin UI"
        ],
        "operationId": "getBootstrapUiData",
        "responses": {
          "202": {
            "description": "bootstrapUiSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/bootstrapUiSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/context": {
      "get": {
        "tags": [
          "Context"
        ],
        "operationId": "getContextFields",
        "responses": {
          "200": {
            "description": "contextFieldsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contextFieldsSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Context"
        ],
        "operationId": "createContextField",
        "requestBody": {
          "description": "upsertContextFieldSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/upsertContextFieldSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/context/{contextField}": {
      "get": {
        "tags": [
          "Context"
        ],
        "operationId": "getContextField",
        "responses": {
          "200": {
            "description": "contextFieldSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contextFieldSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "contextField",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Context"
        ],
        "operationId": "updateContextField",
        "requestBody": {
          "description": "upsertContextFieldSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/upsertContextFieldSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "contextField",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Context"
        ],
        "operationId": "deleteContextField",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "contextField",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/context/validate": {
      "post": {
        "tags": [
          "Context"
        ],
        "operationId": "validate",
        "requestBody": {
          "description": "nameSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/nameSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/state/import": {
      "post": {
        "tags": [
          "Import/Export"
        ],
        "operationId": "import",
        "responses": {
          "202": {
            "description": "This response has no body."
          }
        },
        "requestBody": {
          "description": "stateSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/stateSchema"
              }
            }
          }
        }
      }
    },
    "/api/admin/state/export": {
      "get": {
        "tags": [
          "Import/Export"
        ],
        "operationId": "export",
        "responses": {
          "200": {
            "description": "stateSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/stateSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "format",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "yaml"
              ],
              "default": "json"
            },
            "description": "Desired export format. Must be either `json` or `yaml`.",
            "in": "query"
          },
          {
            "name": "download",
            "schema": {
              "default": false,
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            "description": "Whether exported data should be downloaded as a file.",
            "in": "query"
          },
          {
            "name": "strategies",
            "schema": {
              "default": true,
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ]
            },
            "description": "Whether strategies should be included in the exported data.",
            "in": "query"
          },
          {
            "name": "featureToggles",
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ],
              "default": true
            },
            "description": "Whether feature toggles should be included in the exported data.",
            "in": "query"
          },
          {
            "name": "projects",
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ],
              "default": true
            },
            "description": "Whether projects should be included in the exported data.",
            "in": "query"
          },
          {
            "name": "tags",
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ],
              "default": true
            },
            "description": "Whether tag types, tags, and feature_tags should be included in the exported data.",
            "in": "query"
          },
          {
            "name": "environments",
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "number"
                }
              ],
              "default": true
            },
            "description": "Whether environments should be included in the exported data.",
            "in": "query"
          }
        ]
      }
    },
    "/api/admin/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "operationId": "getTags",
        "responses": {
          "200": {
            "description": "tagsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagsSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "operationId": "createTag",
        "responses": {
          "201": {
            "description": "This response has no body."
          }
        },
        "requestBody": {
          "description": "tagSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tagSchema"
              }
            }
          }
        }
      }
    },
    "/api/admin/tags/{type}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "operationId": "getTagsByType",
        "responses": {
          "200": {
            "description": "tagsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/tags/{type}/{value}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "operationId": "getTag",
        "responses": {
          "200": {
            "description": "tagWithVersionSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagWithVersionSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "operationId": "deleteTag",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "value",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/tag-types": {
      "get": {
        "tags": [
          "Tags"
        ],
        "operationId": "getTagTypes",
        "responses": {
          "200": {
            "description": "tagTypesSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagTypesSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Tags"
        ],
        "operationId": "createTagType",
        "responses": {
          "201": {
            "description": "tagTypeSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagTypeSchema"
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "tagTypeSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tagTypeSchema"
              }
            }
          }
        }
      }
    },
    "/api/admin/tag-types/validate": {
      "post": {
        "tags": [
          "Tags"
        ],
        "operationId": "validateTagType",
        "responses": {
          "200": {
            "description": "validateTagTypeSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/validateTagTypeSchema"
                }
              }
            }
          }
        },
        "requestBody": {
          "description": "tagTypeSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tagTypeSchema"
              }
            }
          }
        }
      }
    },
    "/api/admin/tag-types/{name}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "operationId": "getTagType",
        "responses": {
          "200": {
            "description": "tagTypeSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagTypeSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Tags"
        ],
        "operationId": "updateTagType",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "requestBody": {
          "description": "updateTagTypeSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateTagTypeSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Tags"
        ],
        "operationId": "deleteTagType",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/addons": {
      "get": {
        "tags": [
          "Addons"
        ],
        "operationId": "getAddons",
        "responses": {
          "200": {
            "description": "addonsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/addonsSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Addons"
        ],
        "operationId": "createAddon",
        "requestBody": {
          "description": "addonSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addonSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "addonSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/addonSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/addons/{id}": {
      "get": {
        "tags": [
          "Addons"
        ],
        "operationId": "getAddon",
        "responses": {
          "200": {
            "description": "addonSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/addonSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Addons"
        ],
        "operationId": "updateAddon",
        "requestBody": {
          "description": "addonSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/addonSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "addonSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/addonSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Addons"
        ],
        "operationId": "deleteAddon",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/api-tokens": {
      "get": {
        "tags": [
          "API tokens"
        ],
        "operationId": "getAllApiTokens",
        "responses": {
          "200": {
            "description": "apiTokensSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiTokensSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "API tokens"
        ],
        "operationId": "createApiToken",
        "requestBody": {
          "description": "createApiTokenSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createApiTokenSchema"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "apiTokenSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiTokenSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/api-tokens/{token}": {
      "put": {
        "tags": [
          "API tokens"
        ],
        "operationId": "updateApiToken",
        "requestBody": {
          "description": "updateApiTokenSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateApiTokenSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "API tokens"
        ],
        "operationId": "deleteApiToken",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/user-admin/validate-password": {
      "post": {
        "tags": [
          "Users"
        ],
        "operationId": "validateUserPassword",
        "requestBody": {
          "description": "passwordSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/passwordSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/user-admin/{id}/change-password": {
      "post": {
        "tags": [
          "Users"
        ],
        "operationId": "changeUserPassword",
        "requestBody": {
          "description": "passwordSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/passwordSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/user-admin/reset-password": {
      "post": {
        "tags": [
          "Users"
        ],
        "operationId": "resetUserPassword",
        "requestBody": {
          "description": "idSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/idSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "resetPasswordSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/resetPasswordSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/user-admin": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "getUsers",
        "responses": {
          "200": {
            "description": "usersSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersSchema"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Users"
        ],
        "operationId": "createUser",
        "requestBody": {
          "description": "createUserSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createUserSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "userSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/user-admin/search": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "searchUsers",
        "responses": {
          "200": {
            "description": "usersSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/user-admin/access": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "getBaseUsersAndGroups",
        "responses": {
          "200": {
            "description": "usersGroupsBaseSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersGroupsBaseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/user-admin/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "operationId": "getUser",
        "responses": {
          "200": {
            "description": "userSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "operationId": "updateUser",
        "requestBody": {
          "description": "updateUserSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateUserSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "userSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "operationId": "deleteUser",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/feedback": {
      "post": {
        "tags": [
          "Admin UI"
        ],
        "operationId": "createFeedback",
        "requestBody": {
          "description": "feedbackSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/feedbackSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "feedbackSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feedbackSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/feedback/{id}": {
      "put": {
        "tags": [
          "Admin UI"
        ],
        "operationId": "updateFeedback",
        "requestBody": {
          "description": "feedbackSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/feedbackSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "feedbackSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/feedbackSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "getProjects",
        "responses": {
          "200": {
            "description": "projectsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/projectsSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getFeatureEnvironment",
        "responses": {
          "200": {
            "description": "featureEnvironmentSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureEnvironmentSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "toggleFeatureEnvironmentOff",
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "toggleFeatureEnvironmentOn",
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getFeatureStrategies",
        "responses": {
          "200": {
            "description": "featureStrategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureStrategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "addFeatureStrategy",
        "requestBody": {
          "description": "createFeatureStrategySchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createFeatureStrategySchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureStrategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureStrategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getFeatureStrategy",
        "responses": {
          "200": {
            "description": "featureStrategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureStrategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "strategyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Features"
        ],
        "operationId": "updateFeatureStrategy",
        "requestBody": {
          "description": "updateFeatureStrategySchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateFeatureStrategySchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureStrategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureStrategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "strategyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "Features"
        ],
        "operationId": "patchFeatureStrategy",
        "requestBody": {
          "description": "patchesSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchesSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureStrategySchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureStrategySchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "strategyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "operationId": "deleteFeatureStrategy",
        "tags": [
          "Features"
        ],
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "strategyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/set-sort-order": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "setStrategySortOrder",
        "requestBody": {
          "description": "setStrategySortOrderSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/setStrategySortOrderSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getFeatures",
        "responses": {
          "200": {
            "description": "featuresSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featuresSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "createFeature",
        "requestBody": {
          "description": "createFeatureSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/createFeatureSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/clone": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "cloneFeature",
        "requestBody": {
          "description": "cloneFeatureSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/cloneFeatureSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}": {
      "get": {
        "operationId": "getFeature",
        "tags": [
          "Features"
        ],
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Features"
        ],
        "operationId": "updateFeature",
        "requestBody": {
          "description": "updateFeatureSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/updateFeatureSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "Features"
        ],
        "operationId": "patchFeature",
        "requestBody": {
          "description": "patchesSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchesSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "delete": {
        "tags": [
          "Features"
        ],
        "operationId": "archiveFeature",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/environments": {
      "post": {
        "tags": [
          "Projects"
        ],
        "operationId": "addEnvironmentToProject",
        "requestBody": {
          "description": "projectEnvironmentSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/projectEnvironmentSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/environments/{environment}": {
      "delete": {
        "tags": [
          "Projects"
        ],
        "operationId": "removeEnvironmentFromProject",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "environment",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "getProjectHealthOverview",
        "responses": {
          "200": {
            "description": "healthOverviewSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/healthOverviewSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/health-report": {
      "get": {
        "tags": [
          "Projects"
        ],
        "operationId": "getProjectHealthReport",
        "responses": {
          "200": {
            "description": "healthReportSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/healthReportSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/projects/{projectId}/features/{featureName}/variants": {
      "get": {
        "tags": [
          "Features"
        ],
        "operationId": "getFeatureVariants",
        "responses": {
          "200": {
            "description": "featureVariantsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureVariantsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "tags": [
          "Features"
        ],
        "operationId": "patchFeatureVariants",
        "requestBody": {
          "description": "patchesSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patchesSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureVariantsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureVariantsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "tags": [
          "Features"
        ],
        "operationId": "overwriteFeatureVariants",
        "requestBody": {
          "description": "variantsSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/variantsSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "featureVariantsSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/featureVariantsSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/environments": {
      "get": {
        "tags": [
          "Environments"
        ],
        "operationId": "getAllEnvironments",
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/environments/{name}": {
      "get": {
        "tags": [
          "Environments"
        ],
        "operationId": "getEnvironment",
        "responses": {
          "200": {
            "description": "environmentSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/environmentSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/environments/sort-order": {
      "put": {
        "tags": [
          "Environments"
        ],
        "operationId": "updateSortOrder",
        "requestBody": {
          "description": "sortOrderSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sortOrderSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "This response has no body."
          }
        }
      }
    },
    "/api/admin/environments/{name}/on": {
      "post": {
        "tags": [
          "Environments"
        ],
        "operationId": "toggleEnvironmentOn",
        "responses": {
          "204": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/environments/{name}/off": {
      "post": {
        "tags": [
          "Environments"
        ],
        "operationId": "toggleEnvironmentOff",
        "responses": {
          "204": {
            "description": "This response has no body."
          }
        },
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/splash/{id}": {
      "post": {
        "tags": [
          "Admin UI"
        ],
        "operationId": "updateSplashSettings",
        "responses": {
          "200": {
            "description": "splashSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/splashSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/constraints/validate": {
      "post": {
        "tags": [
          "Features"
        ],
        "operationId": "validateConstraint",
        "requestBody": {
          "description": "constraintSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/constraintSchema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "validConstraint"
          },
          "400": {
            "description": "invalidConstraint"
          }
        }
      }
    },
    "/api/client/features/{featureName}": {
      "get": {
        "operationId": "getClientFeature",
        "tags": [
          "Client"
        ],
        "responses": {
          "200": {
            "description": "clientFeaturesSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/clientFeaturesSchema"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "featureName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/client/features": {
      "get": {
        "operationId": "getAllClientFeatures",
        "tags": [
          "Client"
        ],
        "responses": {
          "200": {
            "description": "clientFeaturesSchema",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/clientFeaturesSchema"
                }
              }
            }
          }
        }
      }
    },
    "/api/client/metrics": {
      "post": {
        "tags": [
          "Client"
        ],
        "operationId": "registerClientMetrics",
        "requestBody": {
          "description": "clientMetricsSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/clientMetricsSchema"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "This response has no body."
          },
          "400": {
            "description": "The request data does not match what we expect."
          }
        }
      }
    },
    "/api/client/register": {
      "post": {
        "tags": [
          "Client"
        ],
        "operationId": "registerClientApplication",
        "requestBody": {
          "description": "clientApplicationSchema",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/clientApplicationSchema"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "This response has no body."
          }
        }
      }
    }
  }
}

Note: the tags section specifically looks like this:

"tags": [
    {
      "name": "Addons",
      "description": "Create, update, and delete [Unleash addons](https://docs.getunleash.io/addons)."
    },
    {
      "name": "Admin UI",
      "description": "Configure the Unleash Admin UI."
    },
    {
      "name": "API tokens",
      "description": "Create, update, and delete [Unleash API tokens](https://docs.getunleash.io/reference/api-tokens-and-client-keys)."
    },
    {
      "name": "Archive",
      "description": "Revive or permanently delete [archived feature toggles](https://docs.getunleash.io/advanced/archived_toggles)."
    },
    {
      "name": "Auth",
      "description": "Manage logins, passwords, etc."
    },
    {
      "name": "Client",
      "description": "Endpoints for [Unleash server-side clients](https://docs.getunleash.io/sdks)."
    },
    {
      "name": "Context",
      "description": "Create, update, and delete [context fields](https://docs.getunleash.io/user_guide/unleash_context) that Unleash is aware of."
    },
    {
      "name": "Environments",
      "description": "Create, update, delete, enable or disable [environments](https://docs.getunleash.io/user_guide/environments) for this Unleash instance."
    },
    {
      "name": "Events",
      "description": "Read events from this Unleash instance."
    },
    {
      "name": "Features",
      "description": "Create, update, and delete [features toggles](https://docs.getunleash.io/reference/feature-toggles)."
    },
    {
      "name": "Import/Export",
      "description": "[Import and export](https://docs.getunleash.io/deploy/import_export) the state of your Unleash instance."
    },
    {
      "name": "Metrics",
      "description": "Register, read, or delete metrics recorded by Unleash."
    },
    {
      "name": "Operational",
      "description": "Endpoints related to the operational status of this Unleash instance."
    },
    {
      "name": "Playground",
      "description": "Evaluate an Unleash context against your feature toggles."
    },
    {
      "name": "Projects",
      "description": "Create, update, and delete [Unleash projects](https://docs.getunleash.io/user_guide/projects)."
    },
    {
      "name": "Strategies",
      "description": "Create, update, delete, manage [custom strategies](https://docs.getunleash.io/advanced/custom_activation_strategy)."
    },
    {
      "name": "Tags",
      "description": "Create, update, and delete [tags and tag types](https://docs.getunleash.io/advanced/tags)."
    },
    {
      "name": "Users",
      "description": "Manage users and passwords."
    }
  ]
  1. With this docusaurus.config.js snippet and sidebars.js snippet:

docusaurus.config.js

        [
            'docusaurus-plugin-openapi-docs',
            {
                id: 'api-operations',
                docsPluginId: 'classic',
                config: {
                    server: {
                        specPath: '<path-to-spec>',
                        outputDir: 'docs/generated/openapi/server',
                        sidebarOptions: {
                            groupPathsBy: 'tag',
                            categoryLinkSource: 'tag'
                        },
                    },
                },
            },
        ],
    ],

sidebars.js entry

        {
            label: 'OpenAPI',
            collapsed: true,
            type: 'category',
            link: {
                type: 'generated-index',
                title: 'API docs',
                description: 'Generated API docs for the OpenAPI spec',
                slug: '/openapi',
            },
            items: require('./docs/generated/openapi/server/sidebar.js'),
        },
  1. Generate the spec
  2. Notice that the order in the generated sidebar.js is not the same as in the spec.

Screenshots

Generated sidebar order in rendered docusaurus:
image

Swagger UI's order of the same tags:
image

Context

I would like the categories to be sorted alphabetically so that it makes it easier to find what you're looking for. I can imagine cases where you want a different sort order or a different specific order, but my use case is for alphabetic sort specifically.

Your Environment


Edit

Accidentally submitted before I finished typing it up.

@thomasheartman thomasheartman added the bug Something isn't working label Aug 10, 2022
@sserrata
Copy link
Member

Hi @thomasheartman, thanks so much for the detailed issue. I think "sorting the sidebar before finishing up" makes the most sense, and should be easy to implement. My guess is that it's a combination of async and un-ordered objects that's the root cause, but we'll make sure.

@sserrata
Copy link
Member

Never mind, it might be even easier than expected. I was able to apply sorting earlier in the process and it seems to work.

Screen Shot 2022-08-10 at 10 38 20 AM

@thomasheartman
Copy link
Author

@sserrata Thanks for the quick follow-up! And glad that it seems easier than expected 😁

If you can sort alphabetically, then that solves my problem for now, but I had a thought that it might make the most sense for the order to be the same as the spec. That way, the creators have full control. But I'm not sure I'm convinced myself 😅 I'll leave how to solve it up to you; just thought I'd mention that as a point of view ☺️

@sserrata
Copy link
Member

Hi @thomasheartman, after discussing internally we also determined it would be best to maintain the natural order of the tags in the OpenAPI spec. I just pushed a couple of changes to implement this and will merge after a bit more testing.

@sserrata
Copy link
Member

0.0.0-420 is published and ready for testing

@thomasheartman
Copy link
Author

Fantastic! Thanks for the quick turnaround on this 🙌🙌 I'll see if I can't take it for a spin tomorrow 😁

And yeah, I think you landed on the right decision I regards to the ordering. We already sort ours, so it's the same for us, but this way, it is more flexible. Good work 💯

@thomasheartman
Copy link
Author

Just wanted to mention that I took 0.0.0-420 for a spin and i seems to work perfectly here 🙋🏼 Thanks again for the help with it! 🙌🏼 Do you know roughly when it'd be released as a full version?

And now that we're talking about ordering, I had a look at the order of operations under each tag and started wondering about how they're ordered. From what I can tell, this ordering depends on the order in which the operations appear in the spec. It also seems consistent with Swagger UI's ordering. I think this is probably the right way to do it, but it wasn't immediately obvious how that ordering happens, so that might be worth noting in the docs.

@sserrata
Copy link
Member

Thanks for the feedback. The change introduced another regression bug that manifests when using x-displayName in your root level tag definitions. By the way, did you know that you could use x-displayName to influence the way API sidebar categories are ultimately formatted/displayed?

I'm finalizing the testing for the new bug and should have something out soon. That said, we should also have a new release out by end of day today.

@thomasheartman
Copy link
Author

Oh, interesting; I did not know about x-displayName! Thanks for the heads up 😄

And nice! I see 1.1.5 is out and that the predefined ordering functionality is included. Amazing; thanks again! 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants