{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/methodfi/main/json-schema/methodfi-secret-response-schema.json",
  "title": "SecretResponse",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/methodfi-secrets-api-openapi.yml#/components/schemas/SecretResponse",
  "allOf": [
    {
      "$ref": "#/$defs/SuccessEnvelope"
    },
    {
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/$defs/Secret"
        }
      }
    }
  ],
  "$defs": {
    "Metadata": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "description": "Arbitrary key-value metadata attached to the resource."
    },
    "Secret": {
      "type": "object",
      "required": [
        "id",
        "metadata",
        "status",
        "created_at",
        "updated_at"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the secret."
        },
        "metadata": {
          "$ref": "#/$defs/Metadata"
        },
        "status": {
          "$ref": "#/$defs/SecretStatus"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the secret was created."
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the secret was last updated."
        }
      }
    },
    "SecretStatus": {
      "type": "string",
      "enum": [
        "active",
        "deleted"
      ]
    },
    "SuccessEnvelope": {
      "type": "object",
      "description": "Standard envelope for successful responses that return a single payload.",
      "required": [
        "success",
        "data",
        "message"
      ],
      "properties": {
        "success": {
          "type": "boolean",
          "description": "Always `true` for successful responses."
        },
        "data": {
          "description": "Operation-specific response payload."
        },
        "message": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}