{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/gainsight/main/json-schema/gainsight-features-page-schema.json",
  "title": "FeaturesPage",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gainsight-feature-api-openapi.yml#/components/schemas/FeaturesPage",
  "type": "object",
  "properties": {
    "features": {
      "type": "array",
      "description": "Array of features",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/Feature"
      }
    },
    "pageNumber": {
      "type": "integer",
      "format": "int32",
      "description": "Page number",
      "readOnly": true
    },
    "isLastPage": {
      "type": "boolean",
      "description": "True if no more records available on next page",
      "readOnly": true
    }
  },
  "$defs": {
    "Feature": {
      "type": "object",
      "required": [
        "id",
        "name",
        "propertyKey",
        "type"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "FEATURE",
            "MODULE"
          ]
        },
        "parentFeatureId": {
          "type": "string"
        },
        "propertyKey": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ACTIVATED",
            "DELETED"
          ]
        },
        "featureLabels": {
          "type": "array",
          "description": "Array of labels associated with the feature",
          "items": {
            "$ref": "#/$defs/FeatureLabel"
          }
        }
      },
      "title": "Feature",
      "description": "Feature object"
    },
    "FeatureLabel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "color": {
          "type": "string"
        }
      },
      "title": "FeatureLabel",
      "description": "Feature label object"
    }
  }
}