feat(api): publish validated OpenAPI contract
CI / validate (push) Successful in 7m15s
Release / release (push) Successful in 11m32s

This commit is contained in:
dmg
2026-09-10 15:11:57 -04:00
parent c2ac2ad16b
commit 47782b3ccc
19 changed files with 2420 additions and 12 deletions
+11
View File
@@ -0,0 +1,11 @@
import { readFileSync } from "node:fs";
import { resolve } from "node:path";
import { expect, it } from "vitest";
import { GET } from "../app/openapi.yaml/route";
it("serves the canonical YAML bytes publicly, without rewriting or authentication", async () => {
const response = await GET();
expect(response.status).toBe(200);
expect(response.headers.get("content-type")).toBe("application/yaml; charset=utf-8");
expect(Buffer.from(await response.arrayBuffer())).toEqual(readFileSync(resolve(process.cwd(), "../../openapi.yaml")));
});