{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Plugin",
  "type": "object",
  "description": "A Plugin entity represents a plugin configuration that will be executed during the HTTP request/response lifecycle. Plugins provide extra functionality such as authentication, rate limiting, and transformations.",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier of the Plugin."
    },
    "name": {
      "type": "string",
      "description": "The name of the plugin (e.g., rate-limiting, key-auth, cors)."
    },
    "instance_name": {
      "type": "string",
      "description": "An optional custom name to identify an instance of the plugin."
    },
    "config": {
      "type": "object",
      "description": "The configuration properties for the Plugin which vary depending on the plugin being configured."
    },
    "protocols": {
      "type": "array",
      "description": "A list of the request protocols that will trigger this plugin."
    },
    "enabled": {
      "type": "boolean",
      "description": "Whether the plugin is applied."
    },
    "tags": {
      "type": "array",
      "description": "An optional set of strings for grouping and filtering."
    },
    "ordering": {
      "type": "object",
      "description": "Describes a dependency to another plugin to determine plugin ordering during the access phase (Enterprise only)."
    },
    "service": {
      "type": "object",
      "description": "If set, the plugin will only activate when receiving requests via the specified Service."
    },
    "route": {
      "type": "object",
      "description": "If set, the plugin will only activate when receiving requests via the specified Route."
    },
    "consumer": {
      "type": "object",
      "description": "If set, the plugin will activate only for requests where the specified Consumer has been authenticated."
    },
    "consumer_group": {
      "type": "object",
      "description": "If set, the plugin will activate only for requests within the specified Consumer Group."
    },
    "created_at": {
      "type": "integer",
      "description": "Unix epoch timestamp of when the entity was created."
    },
    "updated_at": {
      "type": "integer",
      "description": "Unix epoch timestamp of when the entity was last updated."
    }
  }
}