Skip to content

Commit 3931a2e

Browse files
committed
docs: Fix typos
1 parent 328dcb0 commit 3931a2e

4 files changed

Lines changed: 12 additions & 9 deletions

File tree

docs/content/server/best-practices.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,13 @@ export const IntId = z.coerce.number().min(0).meta({ ref: "IntId" });
153153
export const Username = z.string().min(2).max(32).meta({ ref: "Username" });
154154
export const Password = z.string().min(8).max(128).meta({ ref: "Password" });
155155
export const Role = z.enum(["admin", "user", "guest"]).meta({ ref: "Role" });
156-
export const User = z.object({
157-
id: IntId,
158-
username: Username,
159-
role: Role,
160-
});
156+
export const User = z
157+
.object({
158+
id: IntId,
159+
username: Username,
160+
role: Role,
161+
})
162+
.meta({ ref: "User" });
161163

162164
// IO Schemas
163165

docs/content/server/error-handling.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ To disable the stack trace, set `NODE_ENV=production` in the environment variabl
6060
Alternatively, you can use a subclass of `HttpError` so you don't have to manually pass the status into the constructor:
6161

6262
```diff
63-
+import { NotImplementedError } from "@aklinker1/zeta";
63+
-import { HttpError } from "@aklinker1/zeta";
64+
+import { NotImplementedHttpError } from "@aklinker1/zeta";
6465

6566
const app = createApp().get("/users", {}, () => {
6667
- throw new HttpError(HttpStatus.NotImplemented, "TODO");
67-
+ throw new NotImplementedError("TODO");
68+
+ throw new NotImplementedHttpError("TODO");
6869
});
6970
```

docs/content/server/routes/request-body.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const app = createApp().post(
3333
Most of the time the body will be an object, but it can be any valid JSON value, like a number, string, array, boolean, etc.
3434

3535
{% alert(type="warning") %}
36-
Devs forget to set the `Content-Type` header when using `fetch` directly with a JSON body. If you forget, the `body` will be `undefined` in the handler!
36+
Devs often forget to set the `Content-Type` header when using `fetch` directly with a JSON body. If you forget, the `body` will be `undefined` in the handler!
3737
{% end %}
3838

3939
## File

docs/content/testing/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Here's an example app:
1515
import { createApp } from "@aklinker1/zeta";
1616
import { z } from "zod";
1717

18-
const app = createApp().get(
18+
export const app = createApp().get(
1919
"/health",
2020
{
2121
operationId: "healthCheck",

0 commit comments

Comments
 (0)