{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/antfly/json-schema/antfly-secret-entry-schema.json",
  "title": "SecretEntry",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/antfly-cluster-management-api-openapi.yml#/components/schemas/SecretEntry",
  "type": "object",
  "required": [
    "key",
    "status"
  ],
  "properties": {
    "key": {
      "type": "string",
      "description": "Secret name (e.g., openai.api_key)"
    },
    "status": {
      "$ref": "#/$defs/SecretStatus"
    },
    "source": {
      "type": "string",
      "description": "Name of the winning source, or environment."
    },
    "managed": {
      "type": "boolean",
      "description": "Whether this key has an Antfly-managed override that can be deleted."
    },
    "revision": {
      "type": "integer",
      "format": "uint64",
      "description": "Committed native entry revision, when supported by the configured backend."
    },
    "env_var": {
      "type": "string",
      "description": "Corresponding environment variable name (e.g., OPENAI_API_KEY)"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "SecretStatus": {
      "type": "string",
      "enum": [
        "configured_file",
        "configured_env",
        "configured_both"
      ],
      "description": "Source of the secret configuration"
    }
  }
}