feat: migrate from Elysia Eden to Contract-First API (OpenAPI)
This commit is contained in:
7
scripts/generate-schema.ts
Normal file
7
scripts/generate-schema.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import api from "../src/api";
|
||||
|
||||
const response = await api.handle(new Request("http://localhost/api/docs/json"));
|
||||
const schema = await response.json();
|
||||
|
||||
await Bun.write("generated/schema.json", JSON.stringify(schema, null, 2));
|
||||
console.log("✅ OpenAPI schema generated at generated/schema.json");
|
||||
Reference in New Issue
Block a user