refactor(httpapi): fork server startup by flag (#24799)

This commit is contained in:
Kit Langton
2026-04-28 11:02:35 -04:00
committed by GitHub
parent 3fa78a8b01
commit 7739cc53b4
23 changed files with 190 additions and 371 deletions
+8 -1
View File
@@ -9,7 +9,14 @@ import path from "path"
import { createClient } from "@hey-api/openapi-ts"
await $`bun dev generate > ${dir}/openapi.json`.cwd(path.resolve(dir, "../../opencode"))
const openapiSource = process.env.OPENCODE_SDK_OPENAPI === "httpapi" ? "httpapi" : "hono"
const opencode = path.resolve(dir, "../../opencode")
if (openapiSource === "httpapi") {
await $`bun dev generate --httpapi > ${dir}/openapi.json`.cwd(opencode)
} else {
await $`bun dev generate > ${dir}/openapi.json`.cwd(opencode)
}
await createClient({
input: "./openapi.json",