{
  "openapi" : "3.1.0",
  "info" : {
    "title" : "GWT and FSM Render Service",
    "version" : "1.18.0",
    "description" : "Stateless renderer for GWT HTML/JSONP reports and FSM schema diagrams. The service is reached through Traefik at /gwt-renderer and /fsm-renderer, or directly at the canonical /openapi.json route. Request bodies are bounded by RENDER_MAX_BODY_BYTES (default 2097152) and render jobs by RENDER_TIMEOUT_SECONDS (default 30). Swagger UI is served offline from /docs/."
  },
  "servers" : [ {
    "url" : "/gwt-renderer/1.18.0",
    "description" : "Pinned GWT renderer 1.18.0 (do not drift)"
  }, {
    "url" : "/gwt-renderer/latest",
    "description" : "Latest GWT renderer for humans; pin a versioned route instead"
  }, {
    "url" : "/fsm-renderer",
    "description" : "FSM schema renderer alias"
  }, {
    "url" : "/",
    "description" : "Canonical host; fetch the specification from /openapi.json"
  } ],
  "tags" : [ {
    "name" : "health",
    "description" : "Liveness checks"
  }, {
    "name" : "report",
    "description" : "GWT report rendering"
  }, {
    "name" : "fsm",
    "description" : "FSM schema rendering"
  }, {
    "name" : "compat",
    "description" : "Release and data-contract compatibility"
  }, {
    "name" : "docs",
    "description" : "API documentation"
  } ],
  "paths" : {
    "/openapi.json" : {
      "get" : {
        "tags" : [ "docs" ],
        "summary" : "Fetch this OpenAPI document",
        "operationId" : "getOpenApi",
        "responses" : {
          "200" : {
            "description" : "OpenAPI 3.1 JSON",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "object"
                }
              }
            }
          }
        }
      }
    },
    "/health" : {
      "get" : {
        "tags" : [ "health" ],
        "summary" : "Report service liveness",
        "operationId" : "getHealth",
        "responses" : {
          "200" : {
            "description" : "Service is alive",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "string",
                  "example" : "ok"
                }
              }
            }
          }
        }
      }
    },
    "/v1/compatibility" : {
      "get" : {
        "tags" : [ "compat" ],
        "summary" : "Report the renderer compatibility contract",
        "description" : "Returns the service version/tag/commit, the transport API version and report path, the accepted GWT data contracts, and the canonical viewer hash. Consumers pin this identity instead of inferring it from a route.",
        "operationId" : "getCompatibility",
        "responses" : {
          "200" : {
            "description" : "Renderer compatibility identity",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Compatibility"
                }
              }
            }
          }
        }
      }
    },
    "/v1/report" : {
      "post" : {
        "tags" : [ "report" ],
        "summary" : "Render a GWT report bundle",
        "description" : "Accepts canonical per-class GWT report data. Limits: at most 10 modules, 500 classes, and 10000 methods across the request.",
        "operationId" : "renderReport",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ReportRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Rendered report bundle keyed by filename",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/FilesBundle"
                }
              }
            }
          },
          "400" : {
            "description" : "Malformed JSON or invalid request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "405" : {
            "description" : "Method is not POST",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "Request body exceeds RENDER_MAX_BODY_BYTES",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "Content-Type is not application/json",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "Rendering failed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "504" : {
            "description" : "Rendering exceeded RENDER_TIMEOUT_SECONDS",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/render" : {
      "post" : {
        "tags" : [ "fsm" ],
        "summary" : "Render an FSM schema",
        "description" : "Accepts a schema v1 object. Limits: at most 200 states, 500 transitions, and 100 projections. Returns user and develop SVG views plus canonical JSON.",
        "operationId" : "renderFsm",
        "requestBody" : {
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RenderRequest"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Rendered SVG and canonical JSON files keyed by filename",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/FilesBundle"
                }
              }
            }
          },
          "400" : {
            "description" : "Malformed JSON or invalid request",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "405" : {
            "description" : "Method is not POST",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "413" : {
            "description" : "Request body exceeds RENDER_MAX_BODY_BYTES",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "415" : {
            "description" : "Content-Type is not application/json",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "500" : {
            "description" : "Rendering failed",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          },
          "504" : {
            "description" : "Rendering exceeded RENDER_TIMEOUT_SECONDS",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/docs/" : {
      "get" : {
        "tags" : [ "docs" ],
        "summary" : "Swagger UI documentation",
        "description" : "Offline Swagger UI assets served from the pinned WebJar.",
        "operationId" : "getDocs",
        "responses" : {
          "200" : {
            "description" : "Swagger UI HTML",
            "content" : {
              "text/html" : {
                "schema" : {
                  "type" : "string",
                  "example" : "<!doctype html>"
                }
              }
            }
          }
        }
      }
    }
  },
  "components" : {
    "schemas" : {
      "ReportClass" : {
        "type" : "object",
        "required" : [ "packageName", "className", "methods" ],
        "properties" : {
          "packageName" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "className" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "displayName" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "success" : {
            "type" : [ "boolean", "null" ],
            "x-emit" : "omitempty"
          },
          "durationMillis" : {
            "type" : "integer",
            "x-emit" : "omitempty"
          },
          "setupMillis" : {
            "type" : "integer",
            "x-emit" : "omitempty"
          },
          "teardownMillis" : {
            "type" : "integer",
            "x-emit" : "omitempty"
          },
          "timingInferred" : {
            "type" : "boolean",
            "x-emit" : "omitempty"
          },
          "exceptionText" : {
            "type" : "string",
            "x-emit" : "omitempty"
          },
          "failedScreenshot" : {
            "type" : "string",
            "x-emit" : "omitempty"
          },
          "additionalFailedLogs" : {
            "type" : "object",
            "x-emit" : "omitempty",
            "additionalProperties" : {
              "type" : "array",
              "x-emit" : "always",
              "items" : {
                "type" : "string",
                "x-emit" : "always"
              }
            }
          },
          "setupData" : {
            "type" : "object",
            "x-emit" : "omitempty",
            "additionalProperties" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "methods" : {
            "type" : "array",
            "x-emit" : "always",
            "items" : {
              "$ref" : "#/components/schemas/ReportMethod",
              "x-emit" : "always"
            }
          }
        },
        "additionalProperties" : true,
        "x-order" : [ "packageName", "className", "displayName", "success", "durationMillis", "setupMillis", "teardownMillis", "timingInferred", "exceptionText", "failedScreenshot", "additionalFailedLogs", "setupData", "methods" ],
        "example" : {
          "packageName" : "smoke",
          "className" : "test_renderer",
          "displayName" : "test_renderer",
          "success" : true,
          "methods" : [ {
            "methodName" : "m1",
            "displayName" : "m1",
            "success" : true,
            "labels" : [ {
              "type" : "GIVEN",
              "text" : "a renderer request",
              "details" : [ "reads the canonical contract" ]
            } ],
            "sampleData" : {
              "columns" : [ "id" ],
              "rows" : [ [ "1" ] ]
            }
          } ]
        }
      },
      "ReportMethod" : {
        "type" : "object",
        "required" : [ "methodName" ],
        "properties" : {
          "methodName" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "displayName" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "success" : {
            "type" : [ "boolean", "null" ],
            "x-emit" : "omitempty"
          },
          "durationMillis" : {
            "type" : "integer",
            "x-emit" : "omitempty"
          },
          "failedScreenshot" : {
            "type" : "string",
            "x-emit" : "omitempty"
          },
          "exceptionText" : {
            "type" : "string",
            "x-emit" : "omitempty"
          },
          "additionalFailedLogs" : {
            "type" : "object",
            "x-emit" : "omitempty",
            "additionalProperties" : {
              "type" : "array",
              "x-emit" : "always",
              "items" : {
                "type" : "string",
                "x-emit" : "always"
              }
            }
          },
          "setupData" : {
            "type" : "object",
            "x-emit" : "omitempty",
            "additionalProperties" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "labels" : {
            "type" : "array",
            "x-emit" : "omitempty",
            "items" : {
              "$ref" : "#/components/schemas/ReportLabel",
              "x-emit" : "always"
            }
          },
          "sampleData" : {
            "$ref" : "#/components/schemas/ReportSampleData",
            "x-emit" : "omitempty"
          }
        },
        "additionalProperties" : true,
        "x-order" : [ "methodName", "displayName", "success", "durationMillis", "failedScreenshot", "exceptionText", "additionalFailedLogs", "setupData", "labels", "sampleData" ],
        "example" : {
          "methodName" : "m1",
          "displayName" : "m1",
          "success" : true,
          "labels" : [ {
            "type" : "GIVEN",
            "text" : "a renderer request",
            "details" : [ "reads the canonical contract" ]
          } ],
          "sampleData" : {
            "columns" : [ "id" ],
            "rows" : [ [ "1" ] ]
          }
        }
      },
      "ReportLabel" : {
        "type" : "object",
        "required" : [ "type", "text" ],
        "properties" : {
          "type" : {
            "type" : "string",
            "enum" : [ "SETUP", "GIVEN", "WHEN", "THEN", "AND" ],
            "x-enum" : "LabelType",
            "x-emit" : "always"
          },
          "text" : {
            "type" : "string",
            "x-emit" : "always"
          },
          "details" : {
            "type" : "array",
            "x-emit" : "omitempty",
            "items" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "screenshots" : {
            "type" : "array",
            "x-emit" : "omitempty",
            "items" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "screenshotLabels" : {
            "type" : "array",
            "x-emit" : "omitempty",
            "items" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "screenshotUrls" : {
            "type" : "array",
            "x-emit" : "omitempty",
            "items" : {
              "type" : "string",
              "x-emit" : "always"
            }
          }
        },
        "additionalProperties" : true,
        "x-order" : [ "type", "text", "details", "screenshots", "screenshotLabels", "screenshotUrls" ],
        "example" : {
          "type" : "GIVEN",
          "text" : "a renderer request",
          "details" : [ "reads the canonical contract" ]
        }
      },
      "ReportSampleData" : {
        "type" : "object",
        "required" : [ "columns", "rows" ],
        "properties" : {
          "columns" : {
            "type" : "array",
            "x-emit" : "always",
            "items" : {
              "type" : "string",
              "x-emit" : "always"
            }
          },
          "rows" : {
            "type" : "array",
            "x-emit" : "always",
            "items" : {
              "type" : "array",
              "x-emit" : "always",
              "items" : {
                "type" : "string",
                "x-emit" : "always"
              }
            }
          }
        },
        "additionalProperties" : true,
        "x-order" : [ "columns", "rows" ],
        "example" : {
          "columns" : [ "id" ],
          "rows" : [ [ "1" ] ]
        }
      },
      "ReportModule" : {
        "type" : "object",
        "required" : [ "name", "classes" ],
        "properties" : {
          "name" : {
            "type" : "string",
            "pattern" : "^[A-Za-z0-9._-]+$",
            "description" : "Module name. It must not contain '..' and must be unique in the request."
          },
          "classes" : {
            "type" : "array",
            "maxItems" : 500,
            "items" : {
              "$ref" : "#/components/schemas/ReportClass"
            }
          }
        },
        "additionalProperties" : true,
        "example" : {
          "name" : "smoke",
          "classes" : [ {
            "packageName" : "smoke",
            "className" : "test_renderer",
            "displayName" : "test_renderer",
            "success" : true,
            "methods" : [ ]
          } ]
        }
      },
      "ReportRequest" : {
        "type" : "object",
        "required" : [ "modules" ],
        "properties" : {
          "modules" : {
            "type" : "array",
            "minItems" : 1,
            "maxItems" : 10,
            "items" : {
              "$ref" : "#/components/schemas/ReportModule"
            }
          }
        },
        "additionalProperties" : true,
        "example" : {
          "modules" : [ {
            "name" : "smoke",
            "classes" : [ {
              "packageName" : "smoke",
              "className" : "test_renderer",
              "displayName" : "test_renderer",
              "success" : true,
              "methods" : [ ]
            } ]
          } ]
        }
      },
      "RenderRequest" : {
        "type" : "object",
        "required" : [ "schema" ],
        "properties" : {
          "schema" : {
            "$ref" : "#/components/schemas/FsmSchema"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "schema" : {
            "schemaVersion" : "1",
            "id" : "deploy",
            "title" : "Deploy",
            "initial" : "start",
            "states" : [ {
              "id" : "start",
              "label" : "Start"
            } ],
            "transitions" : [ ],
            "projections" : [ ]
          }
        }
      },
      "FsmSchema" : {
        "type" : "object",
        "required" : [ "schemaVersion", "id", "title", "initial", "states", "transitions", "projections" ],
        "properties" : {
          "schemaVersion" : {
            "const" : "1"
          },
          "id" : {
            "type" : "string",
            "pattern" : "^[a-z][a-z0-9_-]{0,63}$"
          },
          "title" : {
            "type" : "string",
            "minLength" : 1
          },
          "initial" : {
            "type" : "string",
            "description" : "The id of a declared state."
          },
          "states" : {
            "type" : "array",
            "minItems" : 1,
            "maxItems" : 200,
            "items" : {
              "$ref" : "#/components/schemas/FsmState"
            }
          },
          "transitions" : {
            "type" : "array",
            "maxItems" : 500,
            "items" : {
              "$ref" : "#/components/schemas/FsmTransition"
            }
          },
          "projections" : {
            "type" : "array",
            "maxItems" : 100,
            "items" : {
              "$ref" : "#/components/schemas/FsmProjection"
            }
          }
        },
        "additionalProperties" : true,
        "example" : {
          "schemaVersion" : "1",
          "id" : "deploy",
          "title" : "Deploy",
          "initial" : "start",
          "states" : [ {
            "id" : "start",
            "label" : "Start"
          } ],
          "transitions" : [ ],
          "projections" : [ ]
        }
      },
      "FsmState" : {
        "type" : "object",
        "required" : [ "id", "label" ],
        "properties" : {
          "id" : {
            "type" : "string",
            "pattern" : "^[a-z][a-z0-9_-]{0,63}$"
          },
          "label" : {
            "type" : "string",
            "minLength" : 1
          }
        },
        "additionalProperties" : true,
        "example" : {
          "id" : "start",
          "label" : "Start"
        }
      },
      "FsmTransition" : {
        "type" : "object",
        "required" : [ "from", "event", "to" ],
        "properties" : {
          "from" : {
            "type" : "string",
            "description" : "The id of a declared state."
          },
          "event" : {
            "type" : "string",
            "pattern" : "^[a-z][a-z0-9_-]{0,63}$"
          },
          "to" : {
            "type" : "string",
            "description" : "The id of a declared state."
          },
          "label" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "from" : "start",
          "event" : "run",
          "to" : "done"
        }
      },
      "FsmProjection" : {
        "type" : "object",
        "required" : [ "id", "label", "condition", "anchors" ],
        "properties" : {
          "id" : {
            "type" : "string",
            "pattern" : "^[a-z][a-z0-9_-]{0,63}$"
          },
          "label" : {
            "type" : "string",
            "minLength" : 1
          },
          "condition" : {
            "type" : "string",
            "minLength" : 1
          },
          "anchors" : {
            "type" : "array",
            "minItems" : 1,
            "items" : {
              "type" : "string"
            },
            "description" : "Declared state ids."
          },
          "properties" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          }
        },
        "additionalProperties" : true,
        "example" : {
          "id" : "overdue",
          "label" : "Overdue",
          "condition" : "deadline < now",
          "anchors" : [ "start" ]
        }
      },
      "FilesBundle" : {
        "type" : "object",
        "required" : [ "files" ],
        "properties" : {
          "files" : {
            "type" : "object",
            "additionalProperties" : {
              "type" : "string"
            },
            "description" : "Rendered artifact filename to content."
          }
        },
        "example" : {
          "files" : {
            "app-deploy.json" : "{}"
          }
        }
      },
      "Error" : {
        "type" : "object",
        "required" : [ "error" ],
        "properties" : {
          "error" : {
            "type" : "string"
          },
          "details" : {
            "type" : "string"
          }
        },
        "example" : {
          "error" : "invalid request"
        }
      },
      "CompatibilityUtilityTest" : {
        "type" : "object",
        "required" : [ "version", "git_tag", "commit" ],
        "properties" : {
          "version" : {
            "type" : "string",
            "pattern" : "^[0-9]+\\.[0-9]+\\.[0-9]+$"
          },
          "git_tag" : {
            "type" : "string",
            "pattern" : "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
          },
          "commit" : {
            "type" : "string",
            "pattern" : "^[0-9a-f]{7,40}$"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "version" : "1.18.0",
          "git_tag" : "v1.18.0",
          "commit" : "abc1234"
        }
      },
      "CompatibilityDataContract" : {
        "type" : "object",
        "required" : [ "schema_version", "sha256", "utility_test" ],
        "properties" : {
          "schema_version" : {
            "type" : "string",
            "pattern" : "^[0-9]+$"
          },
          "sha256" : {
            "type" : "string",
            "pattern" : "^[0-9a-f]{64}$"
          },
          "utility_test" : {
            "$ref" : "#/components/schemas/CompatibilityUtilityTest"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "schema_version" : "1",
          "sha256" : "0000000000000000000000000000000000000000000000000000000000000000",
          "utility_test" : {
            "version" : "1.18.0",
            "git_tag" : "v1.18.0",
            "commit" : "abc1234"
          }
        }
      },
      "CompatibilityTransport" : {
        "type" : "object",
        "required" : [ "api_version", "report_path" ],
        "properties" : {
          "api_version" : {
            "type" : "string"
          },
          "report_path" : {
            "type" : "string"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "api_version" : "1",
          "report_path" : "/v1/report"
        }
      },
      "Compatibility" : {
        "type" : "object",
        "required" : [ "service", "version", "git_tag", "commit", "transport", "data_contracts", "viewer_sha256" ],
        "properties" : {
          "service" : {
            "type" : "string"
          },
          "version" : {
            "type" : "string"
          },
          "git_tag" : {
            "type" : "string"
          },
          "commit" : {
            "type" : "string"
          },
          "transport" : {
            "$ref" : "#/components/schemas/CompatibilityTransport"
          },
          "data_contracts" : {
            "type" : "array",
            "minItems" : 1,
            "items" : {
              "$ref" : "#/components/schemas/CompatibilityDataContract"
            }
          },
          "viewer_sha256" : {
            "type" : "string",
            "pattern" : "^[0-9a-f]{64}$"
          }
        },
        "additionalProperties" : true,
        "example" : {
          "service" : "gwt-renderer",
          "version" : "1.18.0",
          "git_tag" : "v1.18.0",
          "commit" : "abc1234",
          "transport" : {
            "api_version" : "1",
            "report_path" : "/v1/report"
          },
          "data_contracts" : [ {
            "schema_version" : "1",
            "sha256" : "0000000000000000000000000000000000000000000000000000000000000000",
            "utility_test" : {
              "version" : "1.18.0",
              "git_tag" : "v1.18.0",
              "commit" : "abc1234"
            }
          } ],
          "viewer_sha256" : "0000000000000000000000000000000000000000000000000000000000000000"
        }
      }
    }
  },
  "x-render-limits" : {
    "maxBodyBytes" : 2097152,
    "timeoutSeconds" : 30,
    "report" : {
      "maxModules" : 10,
      "maxClasses" : 500,
      "maxMethods" : 10000
    },
    "fsm" : {
      "maxStates" : 200,
      "maxTransitions" : 500,
      "maxProjections" : 100
    }
  },
  "x-service-version" : "1.18.0",
  "x-service-git-tag" : "v1.18.0",
  "x-service-commit" : "4e257b79fa1a8fc1b31c03562a4ef341e3de4b05",
  "x-gwt-contract-schema-version" : "1",
  "x-gwt-contract-sha256" : "9aa05337991747113675886594baecbfab112c0c45e2d4c1e1a94b9fddfd9685",
  "x-gwt-contract-utility-test-version" : "1.18.0",
  "x-gwt-contract-utility-test-git-tag" : "v1.18.0",
  "x-gwt-contract-utility-test-commit" : "4e257b79fa1a8fc1b31c03562a4ef341e3de4b05",
  "x-renderer-viewer-sha256" : "17a4e5972924d2ab307481409a5bdc87e6924a9e05e740820e90aa042df82fb1",
  "x-schema-version" : "1"
}
