{
  "openapi": "3.1.0",
  "info": {
    "title": "full-example",
    "version": "1.0.0",
    "description": "Argsbarg CLI copy template (MCP, HTTP, configure, skills; no schemagen)"
  },
  "tags": [
    {
      "name": "health",
      "description": "Orchestrator health probes — liveness (online) vs readiness (online + checks passed)."
    },
    {
      "name": "echo",
      "description": "Echo a message (MCP-friendly leaf)."
    },
    {
      "name": "status",
      "description": "Show app version."
    }
  ],
  "paths": {
    "/health/liveness": {
      "get": {
        "tags": [
          "health"
        ],
        "operationId": "health_liveness",
        "summary": "Liveness probe",
        "description": "Returns 200 when the HTTP server is online and accepting requests. Does not run config or readiness checks — use for orchestrator liveness probes only.",
        "responses": {
          "200": {
            "description": "Server is online",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    }
                  },
                  "required": [
                    "ok"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/health/readiness": {
      "get": {
        "tags": [
          "health"
        ],
        "operationId": "health_readiness",
        "summary": "Readiness probe",
        "description": "Returns 200 when the server is online and all readiness checks pass (config file, required app config, and optional program.readiness). Returns 503 when any check fails — use for orchestrator readiness probes before routing traffic.",
        "responses": {
          "200": {
            "description": "Online and ready to serve traffic",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "config_file": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        },
                        "config_required": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        },
                        "custom": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        }
                      },
                      "required": [
                        "config_file",
                        "config_required",
                        "custom"
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "checks"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Online but not ready (one or more checks failed)",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "checks": {
                      "type": "object",
                      "properties": {
                        "config_file": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        },
                        "config_required": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        },
                        "custom": {
                          "type": "object",
                          "properties": {
                            "ok": {
                              "type": "boolean"
                            },
                            "error": {
                              "type": "string"
                            },
                            "missing": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "ok"
                          ]
                        }
                      },
                      "required": [
                        "config_file",
                        "config_required",
                        "custom"
                      ]
                    }
                  },
                  "required": [
                    "ok",
                    "checks"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/echo": {
      "post": {
        "tags": [
          "echo"
        ],
        "operationId": "_echo",
        "summary": "Echo a message (MCP-friendly leaf).",
        "responses": {
          "201": {
            "description": "Successful invocation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid arguments or help requested",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Handler error",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Not ready or missing required config",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json; charset=utf-8": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Text to print."
                  }
                },
                "additionalProperties": false,
                "required": [
                  "message"
                ]
              }
            }
          }
        }
      }
    },
    "/status": {
      "post": {
        "tags": [
          "status"
        ],
        "operationId": "_status",
        "summary": "Show app version.",
        "responses": {
          "201": {
            "description": "Successful invocation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid arguments or help requested",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Handler error",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Not ready or missing required config",
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json; charset=utf-8": {
              "schema": {
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        }
      }
    }
  }
}
