feat(server): Server.openapi() backed by HttpApi spec, parity-checked against Hono output (#25545)
This commit is contained in:
@@ -12,10 +12,12 @@ import { createClient } from "@hey-api/openapi-ts"
|
||||
const openapiSource = process.env.OPENCODE_SDK_OPENAPI === "hono" ? "hono" : "httpapi"
|
||||
const opencode = path.resolve(dir, "../../opencode")
|
||||
|
||||
// `bun dev generate` now derives the spec from the Effect HttpApi contract by
|
||||
// default; pass `--hono` to fall back to the legacy Hono spec for parity diffs.
|
||||
if (openapiSource === "httpapi") {
|
||||
await $`bun dev generate --httpapi > ${dir}/openapi.json`.cwd(opencode)
|
||||
} else {
|
||||
await $`bun dev generate > ${dir}/openapi.json`.cwd(opencode)
|
||||
} else {
|
||||
await $`bun dev generate --hono > ${dir}/openapi.json`.cwd(opencode)
|
||||
}
|
||||
|
||||
await createClient({
|
||||
|
||||
Reference in New Issue
Block a user