{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/formasty-com/json-schema/formasty-com-capabilities-response-schema.json",
  "title": "CapabilitiesResponse",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/formasty-com-openapi.json#/components/schemas/CapabilitiesResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "contractVersion",
    "defaultWorkProfile",
    "supportedScopes",
    "authentication",
    "safeguards",
    "unsupported",
    "endpoints",
    "credential",
    "workspace",
    "workspaceAccess",
    "effectiveOperations",
    "operationAvailability"
  ],
  "properties": {
    "contractVersion": {
      "type": "string"
    },
    "defaultWorkProfile": {
      "type": "object",
      "additionalProperties": true
    },
    "supportedScopes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "authentication": {
      "type": "object",
      "additionalProperties": true
    },
    "safeguards": {
      "type": "object",
      "additionalProperties": true
    },
    "unsupported": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "endpoints": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "credential": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "scopes"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "api_key",
            "oauth"
          ]
        },
        "scopes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "workspace": {
      "type": "object",
      "additionalProperties": true
    },
    "workspaceAccess": {
      "type": "object",
      "additionalProperties": true,
      "description": "OAuth workspace grants and the workspace selected for this evaluation. API keys expose selected mode with one bound workspace."
    },
    "effectiveOperations": {
      "type": "array",
      "description": "Operations immediately available in the evaluated workspace without a target-form check.",
      "items": {
        "type": "string"
      }
    },
    "operationAvailability": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "operation",
          "effective_status",
          "requires_resource_context",
          "blockers"
        ],
        "properties": {
          "operation": {
            "type": "string"
          },
          "effective_status": {
            "type": "string",
            "enum": [
              "available",
              "conditional",
              "blocked"
            ]
          },
          "requires_resource_context": {
            "type": "boolean"
          },
          "blockers": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      }
    }
  }
}