{
  "openapi": "3.1.0",
  "info": {
    "title": "Deployment Risk Gate API",
    "description": "Recommendation API for staging and blocking software deployments based on configurable rollout policies. Pre-launch design; endpoints are not live yet.",
    "version": "0.1.0",
    "x-planned-pricing": {
      "model": "free tier for evaluation, paid tiers by volume",
      "status": "planned; nothing charged before launch"
    }
  },
  "servers": [
    {
      "url": "https://openapiregistry.com/api/v1/deploy-gate",
      "description": "Pre-launch: endpoints are not live yet and answer 503."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/releases/{releaseId}/decide": {
      "post": {
        "summary": "Decide whether a release may proceed",
        "description": "Evaluates configured rollout policies against a pending release and returns a recommendation.",
        "tags": [
          "developer operations"
        ],
        "operationId": "deploy-gate-post-releases-releaseid-decide",
        "parameters": [
          {
            "name": "releaseId",
            "in": "path",
            "required": true,
            "description": "Identifier of the release under review.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "canaryHealthRatio",
            "in": "query",
            "required": false,
            "description": "Ratio of healthy canary instances (0..1).",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Decision produced.",
            "content": {
              "application/json": {
                "example": {
                  "decision": "block",
                  "reasons": [
                    "on-call rotated",
                    "error-rate above 2%"
                  ],
                  "releaseId": "rel-1042"
                },
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Release not found."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Planned for launch: an API key issued on request. Free tier for evaluation, paid tiers by volume; nothing is charged before launch."
      }
    }
  }
}
