docs: add missing OpenAPI annotations for signup/verify, billing/success, billing/webhook
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 16m15s
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 16m15s
This commit is contained in:
parent
427ec8e894
commit
8b31d11e74
15 changed files with 2167 additions and 128 deletions
|
|
@ -92,6 +92,31 @@ describe("App-level routes", () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe("OpenAPI spec completeness", () => {
|
||||
let spec: any;
|
||||
|
||||
beforeAll(async () => {
|
||||
const res = await request(app).get("/openapi.json");
|
||||
expect(res.status).toBe(200);
|
||||
spec = res.body;
|
||||
});
|
||||
|
||||
it("includes POST /v1/signup/verify", () => {
|
||||
expect(spec.paths["/v1/signup/verify"]).toBeDefined();
|
||||
expect(spec.paths["/v1/signup/verify"].post).toBeDefined();
|
||||
});
|
||||
|
||||
it("includes GET /v1/billing/success", () => {
|
||||
expect(spec.paths["/v1/billing/success"]).toBeDefined();
|
||||
expect(spec.paths["/v1/billing/success"].get).toBeDefined();
|
||||
});
|
||||
|
||||
it("includes POST /v1/billing/webhook", () => {
|
||||
expect(spec.paths["/v1/billing/webhook"]).toBeDefined();
|
||||
expect(spec.paths["/v1/billing/webhook"].post).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("Security headers", () => {
|
||||
it("includes helmet security headers", async () => {
|
||||
const res = await request(app).get("/api");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue