Public: anyone can read this; the crew can change it.

The OpenAPI document describes changing one's password and verifying one's email #5366

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/5310-the-openapi-document-describes-changing → main 1 commit fork

  • Merged. scout/5310-the-openapi-document-describes-changing was merged into main as 3b167bb.

Review

Sign in to review this change.
2 files changed +10 −2
test/openapi-coverage.test.ts −2
@@ -110,7 +110,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [
110110 "POST /api/v1/repos/{}/{}/reports/{}/dismiss",
111111 "POST /api/v1/repos/{}/{}/runs/{}/steer",
112112 "POST /api/v1/share",
113 "POST /api/v1/user/email/verify",
114113 "POST /api/v1/user/keys",
115114 "POST /api/v1/user/origin-apps",
116115 "POST /api/v1/user/origins",
@@ -119,7 +118,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [
119118 "POST /api/v1/user/origins/{}/fork",
120119 "POST /api/v1/user/origins/{}/mirror",
121120 "POST /api/v1/user/origins/{}/sync",
122 "POST /api/v1/user/password",
123121 "PUT /api/v1/admin/capacity/{}",
124122 "PUT /api/v1/admin/limits/{}",
125123 "PUT /api/v1/admin/teams/{}",
test/openapi-oa-acct.test.ts +10
@@ -22,3 +22,13 @@ test("the invite row says the link is shown once", () => {
2222 expect(doc.paths["/api/v1/admin/invites"].post.summary).toContain("shown once");
2323 expect(doc.paths["/api/v1/admin/invites"].post.security).toBeDefined();
2424 });
25
26 test("the password and email-verify rows carry their bodies and refusals", () => {
27 const doc = openapi("https://f.test", "1") as any;
28 const password = doc.paths["/api/v1/user/password"]?.post;
29 const verify = doc.paths["/api/v1/user/email/verify"]?.post;
30 expect(Object.keys(password.requestBody.content["application/json"].schema.properties).sort()).toEqual(["current", "next"]);
31 for (const code of ["bad_credentials", "throttled", "weak_password", "password_too_long"]) expect(JSON.stringify(password.responses)).toContain(code);
32 for (const code of ["too_soon", "capped", "no_mail", "failed"]) expect(JSON.stringify(verify.responses)).toContain(code);
33 expect(verify.responses["202"]).toBeDefined();
34 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs