{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/benchling/main/json-schema/benchling-feature-schema.json",
  "title": "Feature",
  "description": "A feature from a feature library",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/benchling-feature-libraries-api-openapi.yml#/components/schemas/Feature",
  "allOf": [
    {
      "$ref": "#/$defs/FeatureBase"
    },
    {
      "properties": {
        "id": {
          "description": "The id of the feature",
          "type": "string"
        },
        "matchType": {
          "description": "The match type of the feature. Used to determine how auto-annotate matches are made.",
          "enum": [
            "nucleotide",
            "protein"
          ],
          "type": "string"
        }
      }
    }
  ],
  "type": "object",
  "$defs": {
    "FeatureBase": {
      "properties": {
        "color": {
          "description": "The color of the annotations generated by the feature. Must be a valid hex string",
          "type": "string"
        },
        "featureLibraryId": {
          "description": "The id of the feature library the feature belongs to",
          "type": "string"
        },
        "featureType": {
          "description": "The type of feature, like gene, promoter, etc. Note: This is an arbitrary string, not an enum\n",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "The name of the feature",
          "type": "string"
        },
        "pattern": {
          "description": "The pattern used for matching during auto-annotation.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}