You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/examples.md
+43-23
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ try {
78
78
</details>
79
79
80
80
<details>
81
-
<summary><ahref="https://www.npmjs.com/package/feature-fetch"target="_blank"rel="noreferrer">feature-fetch</a> by <ahref="https://github.com/builder-group"target="_blank"rel="noreferrer">builder.group</a></summary>
81
+
<summary><ahref="https://www.npmjs.com/package/feature-fetch"target="_blank"rel="noreferrer">feature-fetch</a> by <ahref="https://builder.group"target="_blank"rel="noreferrer">builder.group</a></summary>
82
82
83
83
::: code-group
84
84
@@ -257,26 +257,27 @@ TypeChecking in server environments can be tricky, as you’re often querying da
257
257
258
258
:::
259
259
260
-
## Hono with [`@blgc/openapi-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-router)
260
+
## Hono with [`openapi-ts-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-ts-router)
261
261
262
-
Instead of manually typing each route with generics as in the [Hono example](#hono), [`@blgc/openapi-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-router)wraps around the [Hono router](https://hono.dev/docs/api/routing) to deliver full typesafety and enforce your OpenAPI-Schema with validators.
262
+
[`openapi-ts-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-ts-router)provides full type-safety and runtime validation for your HonoAPI routes by wrapping a [Hono router](https://hono.dev/docs/api/routing):
263
263
264
-
::: tip Good To Know
264
+
::: tip Good to Know
265
265
266
-
While TypeScript types ensure compile-time safety, they don't enforce runtime schema validation. For runtime compliance, you need to integrate with validation libraries like Zod or Valibot. Although you must define the validation rules manually, they are type-safe to ensure these rules are correctly defined.
266
+
While TypeScript ensures compile-time type safety, runtime validation is equally important. `openapi-ts-router` integrates with Zod/Valibot to provide both:
267
+
- Types verify your code matches the OpenAPI spec during development
268
+
- Validators ensure incoming requests match the spec at runtime
- Full type safety for routes, methods, params, body and responses
317
+
- Runtime validation using Zod/Valibot
318
+
- Catches API spec mismatches at compile time
319
+
- Zero manual type definitions needed
310
320
311
-
## Express with [`@blgc/openapi-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-router)
321
+
## Express with [`openapi-ts-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-ts-router)
312
322
313
-
[`@blgc/openapi-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-router)wraps around the [Express router](https://expressjs.com/en/5x/api.html#router) to deliver full typesafety and enforce your OpenAPI-Schema with validators.
323
+
[`openapi-ts-router`](https://github.com/builder-group/community/tree/develop/packages/openapi-ts-router)provides full type-safety and runtime validation for your Express API routes by wrapping a [Express router](https://expressjs.com/en/5x/api.html#router):
314
324
315
-
::: tip Good To Know
325
+
::: tip Good to Know
316
326
317
-
While TypeScript types ensure compile-time safety, they don't enforce runtime schema validation. For runtime compliance, you need to integrate with validation libraries like Zod or Valibot. Although you must define the validation rules manually, they are type-safe to ensure these rules are correctly defined.
327
+
While TypeScript ensures compile-time type safety, runtime validation is equally important. `openapi-ts-router` integrates with Zod/Valibot to provide both:
328
+
- Types verify your code matches the OpenAPI spec during development
329
+
- Validators ensure incoming requests match the spec at runtime
Copy file name to clipboardExpand all lines: docs/ja/examples.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ try {
80
80
</details>
81
81
82
82
<details>
83
-
<summary><ahref="https://www.npmjs.com/package/feature-fetch"target="_blank"rel="noreferrer">feature-fetch</a> by <ahref="https://github.com/builder-group"target="_blank"rel="noreferrer">builder.group</a></summary>
83
+
<summary><ahref="https://www.npmjs.com/package/feature-fetch"target="_blank"rel="noreferrer">feature-fetch</a> by <ahref="https://builder.group"target="_blank"rel="noreferrer">builder.group</a></summary>
0 commit comments