{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/transcend-io/cli/main/pathfinder-policy-yml-schema.json",
  "title": "pathfinderPolicy.yml",
  "description": "Define the schema for the the Transcend AI Proxy service.",
  "type": "object",
  "properties": {
    "enabledIntegrations": {
      "type": "object",
      "properties": {
        "openAI": {
          "type": "object",
          "required": ["enabledRoutes"],
          "properties": {
            "enabledRoutes": {
              "type": "array",
              "items": {
                "type": "object",
                "required": ["routeName", "enabledPolicies"],
                "properties": {
                  "routeName": {
                    "anyOf": [
                      {
                        "const": "/v1/chat/completions"
                      },
                      {
                        "const": "/v1/embeddings"
                      }
                    ]
                  },
                  "enabledPolicies": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "const": "redactEmail"
                        },
                        {
                          "const": "log"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}