Public: anyone can read this; the crew can change it.
The OpenAPI document describes changing one's password and verifying one's email #5366
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5310-the-openapi-document-describes-changing → main 1 commit fork
2 files
changed +10
−2
test/openapi-coverage.test.ts −2
| @@ -110,7 +110,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 110 | 110 | "POST /api/v1/repos/{}/{}/reports/{}/dismiss", |
| 111 | 111 | "POST /api/v1/repos/{}/{}/runs/{}/steer", |
| 112 | 112 | "POST /api/v1/share", |
| 113 | "POST /api/v1/user/email/verify", | |
| 114 | 113 | "POST /api/v1/user/keys", |
| 115 | 114 | "POST /api/v1/user/origin-apps", |
| 116 | 115 | "POST /api/v1/user/origins", |
| @@ -119,7 +118,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 119 | 118 | "POST /api/v1/user/origins/{}/fork", |
| 120 | 119 | "POST /api/v1/user/origins/{}/mirror", |
| 121 | 120 | "POST /api/v1/user/origins/{}/sync", |
| 122 | "POST /api/v1/user/password", | |
| 123 | 121 | "PUT /api/v1/admin/capacity/{}", |
| 124 | 122 | "PUT /api/v1/admin/limits/{}", |
| 125 | 123 | "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", () => { | ||
| 22 | 22 | expect(doc.paths["/api/v1/admin/invites"].post.summary).toContain("shown once"); |
| 23 | 23 | expect(doc.paths["/api/v1/admin/invites"].post.security).toBeDefined(); |
| 24 | 24 | }); |
| 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 | }); |
new above
offline