Skill 安装
多 Agent 安装npx skills add https://github.com/cloudflare/chanfana --skill write-endpoints
使用 npx skills 快速安装,支持将 Skill 添加到多个兼容的 AI Agent。
Skill 调研报告
cloudflare/chanfana#write-endpoints
Skill 更新日志
版本列表
v3.4.0 最新
### Minor Changes
- [#349](https://github.com/cloudflare/chanfana/pull/349) [`98a3ba0`](https://github.com/cloudflare/chanfana/commit/98a3ba006798c0fbf7df859de68f558f8fedcdec) Thanks [@G4brym](https://github.com/G4brym)! - Refresh dependency security, reproducible CI installs, and explicit test tooling.
### Patch Changes
- [#347](https://github.com/cloudflare/chanfana/pull/347) [`deb4a5d`](https://github.com/cloudflare/chanfana/commit/deb4a5d8538e811dfdcf07d0b1ad3bbc993df91c) Thanks [@G4brym](https://github.com/G4brym)! - Preserve the fetched object when preparing update data for lifecycle hooks.
- [#346](https://github.com/cloudflare/chanfana/pull/346) [`7f1f15a`](https://github.com/cloudflare/chanfana/commit/7f1f15a8c7e7cf5adfb6fd8d4d3074fe435764b9) Thanks [@winklemad](https://github.com/winklemad)! - Reject partially numeric query, path, and header parameters instead of silently accepting their numeric prefix.
v3.3.0
### Minor Changes
- [#316](https://github.com/cloudflare/chanfana/pull/316) [`d30cc36`](https://github.com/cloudflare/chanfana/commit/d30cc3662db1b6152f01e1b296cde294cc67939c) Thanks [@G4brym](https://github.com/G4brym)! - Add customizable pagination and ordering parameter names to ListEndpoint via `pageFieldName`, `perPageFieldName`, `orderByFieldName`, and `orderByDirectionFieldName` class properties.
**Breaking change for subclasses overriding `optionFields`:** `optionFields` is now a computed getter derived from the four `*FieldName` properties. Subclasses that previously overrode `optionFields` directly should instead override the individual field name properties.
- [#317](https://github.com/cloudflare/chanfana/pull/317) [`39c89d2`](https://github.com/cloudflare/chanfana/commit/39c89d29e7ff28f5c9ce8c3b76540450d7461818) Thanks [@G4brym](https://github.com/G4brym)! - Add `validateResponse` router option to validate and sanitize response bodies against their Zod schemas at runtime.
When enabled, responses are parsed through `z.object().parseAsync()`, which strips unknown fields and validates required fields/types. This prevents accidental data leaks (e.g., internal fields like `passwordHash` reaching the client) and catches handler bugs where the response doesn't match the declared schema.
```typescript
const router = fromHono(app, { validateResponse: true });
```
**Behavior:**
- Plain object responses are validated against the `200` response schema
- `Response` objects with `application/json` content are cloned, validated, and reconstructed with corrected headers
- Non-JSON responses and responses without a matching Zod schema are passed through unchanged
- Validation failures return `500 Internal Server Error` (code `7013`) and log the full error via `console.error`
**New exports:**
- `ResponseValidationException` — thrown when a handler's response doesn't match its declared schema (status 500, code 7013, `isVisible: false`)
- [#315](https://github.com/cloudflare/chanfana/pull/315) [`47d304a`](https://github.com/cloudflare/chanfana/commit/47d304a3ff48740344aaf1f50979fb7c9ab111ca) Thanks [@G4brym](https://github.com/G4brym)! - Add `SerializerContext` parameter to auto endpoint serializer function, providing access to filters and options for context-aware serialization.
The serializer signature changes from `(obj: object) => object` to `(obj: object, context?: SerializerContext) => object`. The `SerializerContext` type contains:
- `filters` — `Array`: the active filter conditions for the current request
- `options` — pagination and ordering options (`page`, `per_page`, `order_by`, `order_by_direction`)
**Context passed per endpoint type:**
| Endpoint | Context |
| ----------------------------------- | ---------------------- |
| `ListEndpoint` / `ReadEndpoint` | `{ filters, options }` |
| `UpdateEndpoint` / `DeleteEndpoint` | `{ filters }` |
| `CreateEndpoint` | `{ filters: [] }` |
```typescript
const meta = {
model: {
schema: UserSchema,
primaryKeys: ["id"],
tableName: "users",
serializer: (obj: any, context?: SerializerContext) => {
const hasRoleFilter = context?.filters?.some((f) => f.field === "role");
// Conditionally include fields based on active filters
return hasRoleFilter ? obj : omit(obj, ["role"]);
},
},
};
```
**New exports:**
- `SerializerContext` — type for the serializer's second parameter
### Patch Changes
- [#335](https://github.com/cloudflare/chanfana/pull/335) [`028c256`](https://github.com/cloudflare/chanfana/commit/028c2562e6ab0531dd2648a556042445398896da) Thanks [@andrewheberle](https://github.com/andrewheberle)! - Fix: Error from Zod transform is returning 500 instead of 400
- [#328](https://github.com/cloudflare/chanfana/pull/328) [`662ff72`](https://github.com/cloudflare/chanfana/commit/662ff7259819b1ba1038219a4331c69322989c8c) Thanks [@G4brym](https://github.com/G4brym)! - Include CHANGELOG.md in the npm package so AI agents and tools can read the project's change history. Also add a changelog page to the documentation site.
v3.2.1
### Patch Changes
- [#325](https://github.com/cloudflare/chanfana/pull/325) [`c182e59`](https://github.com/cloudflare/chanfana/commit/c182e594258b306da2a03fdd076f73b1ee0326be) Thanks [@G4brym](https://github.com/G4brym)! - Export `OrderByDirection` type alias (`"asc" | "desc"`) so consumers can import it directly instead of inlining literal unions
- [#325](https://github.com/cloudflare/chanfana/pull/325) [`c182e59`](https://github.com/cloudflare/chanfana/commit/c182e594258b306da2a03fdd076f73b1ee0326be) Thanks [@G4brym](https://github.com/G4brym)! - Add `passthroughErrors` option to bypass chanfana's error handling and let errors propagate raw to the framework's error handler
```typescript
import { Hono } from "hono";
import { fromHono, ApiException } from "chanfana";
import { ZodError } from "zod";
const app = new Hono();
app.onError((err, c) => {
// Errors arrive as raw exceptions — no HTTPException wrapping
if (err instanceof ApiException) {
return c.json(
{ ok: false, code: err.code, message: err.message },
err.status as any
);
}
if (err instanceof ZodError) {
return c.json({ ok: false, validationErrors: err.issues }, 400);
}
return c.json({ ok: false, message: "Internal Server Error" }, 500);
});
const openapi = fromHono(app, { passthroughErrors: true });
```
v3.2.0
### Minor Changes
- [#314](https://github.com/cloudflare/chanfana/pull/314) [`2408999`](https://github.com/cloudflare/chanfana/commit/24089994dab32ee4a94162f64ff030dc65684ca1) Thanks [@G4brym](https://github.com/G4brym)! - Add `tags` support to auto endpoint `_meta` for OpenAPI tag grouping
- [#323](https://github.com/cloudflare/chanfana/pull/323) [`d9b7297`](https://github.com/cloudflare/chanfana/commit/d9b7297632f8fc552f18225aab0e61272cde94d7) Thanks [@G4brym](https://github.com/G4brym)! - Add `handleError` hook, `defaultOrderByDirection`, fix validation error format and D1 update with extra columns
- Add `handleError(error)` protected method on `OpenAPIRoute` to transform errors before chanfana formats them. Enables custom error wrapping (e.g., bypassing chanfana's formatter to use Hono's `onError`).
- Add `defaultOrderByDirection` property to `ListEndpoint` (defaults to `"asc"`). Allows configuring the default sort direction when `orderByFields` is used.
- **Breaking:** Validation errors from `validateRequest()` now return `InputValidationException` format instead of raw Zod issues. This makes the actual response match the OpenAPI schema that chanfana documents. If you parse validation error responses, update your code to use the new shape:
**Before:**
```json
{
"errors": [
{
"code": "invalid_type",
"expected": "string",
"received": "number",
"message": "Invalid input: expected string, received number",
"path": ["body", "name"]
}
],
"success": false,
"result": {}
}
```
**After:**
```json
{
"errors": [
{
"code": 7001,
"message": "Invalid input: expected string, received number",
"path": ["body", "name"]
}
],
"success": false,
"result": {}
}
```
Key differences: `code` is now the numeric `7001` (was a string like `"invalid_type"`), and Zod-specific fields (`expected`, `received`) are no longer included.
- `D1UpdateEndpoint.update()` now automatically filters `updatedData` to only include columns defined in the Zod schema. Previously, DB tables with extra columns not in the schema would cause `validateColumnName()` to throw.
v3.1.0
## chanfana@3.1.0
### Minor Changes
#### Breaking Changes
- **Parameter helpers removed** — `Str()`, `Num()`, `Int()`, `Bool()`, `DateTime()`, `DateOnly()`, `Email()`, `Uuid()`, `Hostname()`, `Ipv4()`, `Ipv6()`, `Ip()`, `Regex()`, `Enumeration()`, and `convertParams()` removed. Use native Zod schemas directly.
- **Legacy type support removed** — `legacyTypeIntoZod`, `Arr()`, `Obj()` no longer exported. `contentJson()` now requires a Zod schema.
- **D1 error messages sanitized** — Database errors no longer expose internals. Use `constraintsMessages` for user-friendly messages.
- **D1 delete/update restricted to primary key filters** — Only `primaryKeys` filters used in WHERE clauses.
- **D1 `per_page` capped at 100** — Configurable via `maxPerPage`.
- **`raiseUnknownParameters` enforced** — Was previously accepted but non-functional; now active.
#### New Features
- **10 new exception classes** — `UnauthorizedException` (401), `ForbiddenException` (403), `MethodNotAllowedException` (405), `ConflictException` (409), `UnprocessableEntityException` (422), `TooManyRequestsException` (429), `InternalServerErrorException` (500), `BadGatewayException` (502), `ServiceUnavailableException` (503), `GatewayTimeoutException` (504)
- **D1 SQL injection prevention** — `validateSqlIdentifier()`, `validateTableName()`, `validateColumnName()`, `buildSafeFilters()`, `buildPrimaryKeyFilters()`, `getD1Binding()`, `handleDbError()`, and query clause builders
- **`Retry-After` header** — Automatically set for `TooManyRequestsException` and `ServiceUnavailableException`
- **`getUnvalidatedData()`** — Access raw request data before Zod defaults/transformations
- **Hono `basePath()` auto-detection** — Detected automatically; combining `basePath()` and `base` option now throws a descriptive error
- **Hono error flow** — Errors flow through Hono's `app.onError` as `HTTPException` instances instead of being caught internally
#### Bug Fixes
- D1: Prevent unscoped DELETE/UPDATE via `buildPrimaryKeyFilters()`
- D1: Fix shared exception instances, empty update SQL, LIKE wildcard escaping
- D1: Column names validated against model schema
- D1: Read/Delete endpoints use consistent primary key filters and error handling
- Fixed: schema generation errors now propagate instead of being silently swallowed
- Fixed: `CreateEndpoint` response schema references 201 instead of 200
- Fixed: falsy defaults (`0`, `false`, `""`) correctly applied
- Fixed: BigInt coercion uses `BigInt()` directly to avoid precision loss
- Fixed: boolean coercion null guard, HEAD request body parsing, YAML URL generation
- Fixed: `ApiException` import changed to value import for `instanceof` checks
- Fixed: `ReadEndpoint`/`ListEndpoint` document `InputValidationException` in 400 responses
#### Improvements
- D1 parallel queries via `Promise.all()` for list endpoint
- Configurable `maxPerPage` class property
- Normalized ORDER BY to lowercase `"asc"`/`"desc"`
- `sanitizeOperationId()` removes special characters
- Router constructor validation throws if router argument is missing
- Error responses include `result: {}` for consistent shape
- Comprehensive JSDoc across exception classes, D1 endpoints, and handler methods
### Patch Changes
- Include source code, AI coding skills, and documentation in npm package. Added `llms.txt` entry point.
v3.0.0
# Major release v3.0.0
Migration guide here: https://chanfana.pages.dev/migration-to-chanfana-3#migration-steps
## What's Changed
* Upgraded to Zod v4
* Improved Type Hints for Auto-Endpoint Lifecycle Methods
* New `getUnvalidatedData()` Method
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.8.3...v3.0.0
v2.8.3
## What's Changed
* Respect pathParameters on delete auto endpoint by @G4brym in https://github.com/cloudflare/chanfana/pull/284
* fix(list): safe pagination and order_by whitelist; orderByFields typed by @AllenXPC in https://github.com/cloudflare/chanfana/pull/283
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.8.2...v2.8.3
v2.8.2
## What's Changed
* Fix chanfana cli not supporting writing schemas into folders
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.8.1...v2.8.2
v2.8.1
## What's Changed
* feat: Add CLI command to extract schema.json from servers by @G4brym in https://github.com/cloudflare/chanfana/pull/264
`npx chanfana [-o ] [wrangler-options]`
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.8.0...v2.8.1
v2.8.0
## What's Changed
* Fix auto-endpoint create returning wrong http code by @G4brym in https://github.com/cloudflare/chanfana/pull/255
- Create endpoint will now return HTTP 201 instead of HTTP 200
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.7.2...v2.8.0
v2.7.2
## What's Changed
* [Add more Examples and Recipes to docs](https://chanfana.pages.dev/examples-and-recipes) by @G4brym in https://github.com/cloudflare/chanfana/pull/251
* fix: use literal false for the success field in exceptions by @ratnaraj7 in https://github.com/cloudflare/chanfana/pull/253
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.7.1...v2.7.2
v2.7.1
## What's Changed
* Fix auto-endpoints failing to validate path parameters on nested routers by @G4brym in https://github.com/cloudflare/chanfana/pull/250
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.7.0...v2.7.1
v2.7.0
## What's Changed
* Migrate docs to vitepress by @G4brym in https://github.com/cloudflare/chanfana/pull/238
* fix: base not prepended to openapi_url by @hambergerpls in https://github.com/cloudflare/chanfana/pull/244
* Fix MultiException not extending ApiException by @G4brym in https://github.com/cloudflare/chanfana/pull/247
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.6.3...v2.7.0
v2.6.3
## What's Changed
* Fix url parameters not propagating correctly from outer routers into inner routers by @G4brym in https://github.com/cloudflare/chanfana/pull/233
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.6.2...v2.6.3
v2.6.2
## What's Changed
* Fix itty router nested routers appending the wrong prefix to routes by @G4brym in https://github.com/cloudflare/chanfana/pull/231
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.6.1...v2.6.2
v2.6.1
## What's Changed
* Fix fromHono() type error for apps with overwritten generics by @G4brym in https://github.com/cloudflare/chanfana/pull/230
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.6.0...v2.6.1
v2.6.0
## What's Changed
* Add support for .route() and .all() for Hono and improve Hono types by @G4brym in https://github.com/cloudflare/chanfana/pull/229
You can now use `.route()` to have nested routers, and `.all()` to have a class handle all HTTP methods
```ts
const authors = fromHono(new Hono())
.get('/', ListAuthors)
.post('/', CreateAuthor)
.get('/:id', GetAuthor)
const books = fromHono(new Hono())
.get('/', ListBooks)
.post('/', CreateBook)
.get('/:id', GetBook)
const app = fromHono(new Hono())
app.route('/authors', authors)
app.route('/books', books)
app.all('/events', EventsCatchAll) // .all() will not register any method in the openapi schema
export default app;
```
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.5.4...v2.6.0
v2.5.4
## What's Changed
* Fix list generic endpoint default order by by @G4brym in https://github.com/cloudflare/chanfana/pull/226
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.5.3...v2.5.4
v2.5.3
## What's Changed
* Add custom order by fields to list generic endpoint by @G4brym in https://github.com/cloudflare/chanfana/pull/224
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.5.2...v2.5.3
v2.5.2
## What's Changed
* Minor crud adjustments by @G4brym in https://github.com/cloudflare/chanfana/pull/217
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.5.1...v2.5.2
v2.5.1
## What's Changed
* Add custom constraint messages by @G4brym in https://github.com/cloudflare/chanfana/pull/214
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.5.0...v2.5.1
v2.5.0
## What's Changed
* Fix headers validation for requests that receive empty headers by @G4brym in https://github.com/cloudflare/chanfana/pull/211
* Update generic cruds to use generic d1 binding methods directly instead of orm's by @G4brym in https://github.com/cloudflare/chanfana/pull/212
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.4.2...v2.5.0
v2.4.2
## What's Changed
* Add support for hono.on(method, path, class) by @G4brym in https://github.com/cloudflare/chanfana/pull/208
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.4.1...v2.4.2
v2.4.1
## What's Changed
* Simplify meta definition by @G4brym in https://github.com/cloudflare/chanfana/pull/207
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.4.0...v2.4.1
v2.4.0
## What's Changed
* Bump dependencies
* Lint project
* Several fixes for the build-in CRUD generators
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.3.0...v2.4.0
v2.3.0
## What's Changed
* Add docs for [Hono type hints](https://chanfana.pages.dev/type-hint/#hono-context)
* Several typescript type improvements
* Add built-in [API exception](https://github.com/cloudflare/chanfana/blob/main/src/exceptions.ts)
* Add option to access url parameters while generating schemas [docs here](https://chanfana.pages.dev/advanced-user-guide/utilities/#accessing-url-parameters-from-the-class-schema)
* Improve built-in base CRUD endpoints by @G4brym in https://github.com/cloudflare/chanfana/pull/191
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.2.0...v2.3.0
v2.2.0
## What's Changed
* Add built-in CRUD base endpoints by @G4brym in https://github.com/cloudflare/chanfana/pull/185
This is still very experimental, docs will arrive soon [sneak peek here](https://github.com/cloudflare/chanfana/tree/main/src/endpoints)
## Maintenance Changed
* Migrate to biomejs for lint and format by @G4brym in https://github.com/cloudflare/chanfana/pull/186
* Migrate to vitest and update dependencies by @G4brym in https://github.com/cloudflare/chanfana/pull/190
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.1.0...v2.2.0
v2.1.0
## What's Changed
* Fix #183 by removing any from router adapters
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.0.5...v2.1.0
v2.0.5
## What's Changed
* Fix/Improve contentJson typing by @webda2l in https://github.com/cloudflare/chanfana/pull/182
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.0.4...v2.0.5
v2.0.4
## What's Changed
* Change type to allow docs_url, redoc_url and openapi_url to be null by @marceloverdijk in https://github.com/cloudflare/chanfana/pull/171
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.0.3...v2.0.4
v2.0.3
## What's Changed
* use jsdelivr to replace unpkg and add SRI for resources by @rwv in https://github.com/cloudflare/chanfana/pull/163
* Bump swagger ui and redocs ui versions by @G4brym in https://github.com/cloudflare/chanfana/pull/170
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v2.0.2...v2.0.3
v2.0.2
## Library Revamp
* Rename library from **itty-router-openapi** to **chanfana**
* Refactor everything to separate routing from openapi logic
* Added support for Hono
### Breaking Changes:
- removed `OpenAPIRouter()` method
- removed `aiPlugin` option
- removed `skipValidation` option (see new validation method bellow)
- `itty-router` is no longer a dependency and users must manually add it to their project
- validated data is no longer send in the last argument of the handler function (see new validation method bellow)
- Endpoint's `schema` is no longer a static variable
- Endpoint's `schema.parameters` was renamed to `schema.request` to follow [zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi) structure
- Endpoint `Path` parameters are now called `params` to match the validated Data object name
- Endpoint's `schema.requestBody` was renamed to `schema.request.body` to follow [zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi) structure
- Validation no longer occurs before the endpoint's `handle` function is called, developers must manually call the `getValidatedData` to execute the data validation step
- Tip: you can wrap this function call with `try {} catch (e) {}` to handle input errors, otherwise this library will return the errors in a Json response with http 400
### Additions:
- new `await this.getValidatedData()` method to retrieve all validated data, when sending `` in the generic the returned value will have full typescript inference based on the schema
- automatically coerce all headers, query and params inputs based on specified zod type
- new `fromIttyRouter()` instantiate method
- new `fromHono()` instantiate method
**Migration Guide**: https://chanfana.pages.dev/user-guide/migrating-from-itty-router-openapi/
**Full Changelog**: https://github.com/cloudflare/chanfana/compare/v1.1.1...v2.0.2
v1.1.1
## What's Changed
* Bump @asteasolutions/zod-to-openapi to version 6.4.0 by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/146
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.1.0...v1.1.1
v1.1.0
## What's Changed
* feat: type inference support for data argument by @iann838 in https://github.com/cloudflare/itty-router-openapi/pull/130
Now you can get full type hint and type check on the `data` argument of every endpoint, [learn more here](https://cloudflare.github.io/itty-router-openapi/type-hint/)!
```ts
export class TaskFetch extends OpenAPIRoute {
static schema = {
parameters: {
taskSlug: Path(Str, {
description: 'Task slug',
}),
},
}
async handle(request: Request, env: any, context: any, data: DataOf) {
// full type hint for query, path, header, and request body parameters!
data.params.taskSlug
// ...
}
}
```
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.14...v1.1.0
v1.0.14
## What's Changed
* Fix property content type wrongfully appearing in response schema by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/137
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.13...v1.0.14
v1.0.13
## What's Changed
* Fix unexpected parameter error when running locally with node 18.x by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/135
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/1.0.13...v1.0.13
1.0.13
## What's Changed
* Add support for defining [multiple content types in responses](https://cloudflare.github.io/itty-router-openapi/advanced-user-guide/custom-response-formats/#describing-multiple-content-types)
* Add support for defining [headers in responses](https://cloudflare.github.io/itty-router-openapi/advanced-user-guide/custom-response-headers/)
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.12...1.0.13
v1.0.12
## What's Changed
* Refactor js-yaml import usage by @Sefirost in https://github.com/cloudflare/itty-router-openapi/pull/131
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.11...v1.0.12
v1.0.11
## What's Changed
* Add Skip Validation Flag by @rmzaoo in https://github.com/cloudflare/itty-router-openapi/pull/109
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.10...v1.0.11
v1.0.10
## What's Changed
* Fix all parameters not being detected in non openapi routes
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.9...v1.0.10
v1.0.9
## What's Changed
* Add option to define custom base router
* Fix path parameters not working when using nested routers
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.8...v1.0.9
v1.0.8
## What's Changed
* Add openapi.yaml support by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/119
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.7...v1.0.8
v1.0.7
## What's Changed
* Fix `o3.replace is Not a Function` error by [Locking itty-router version to 4.0.26](https://github.com/cloudflare/itty-router-openapi/commit/3fbefa55e40ff81ce35734e9cebbc3ab66ad18da)
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.6...v1.0.7
v1.0.6
## What's Changed
* fix headers params by @rmzaoo in https://github.com/cloudflare/itty-router-openapi/pull/108
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.5...v1.0.6
v1.0.5
## What's Changed
* Fix sending empty query parameters being parsed as empty strings instead of null by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/104
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.4...v1.0.5
v1.0.4
## What's Changed
* Allow binary content type by @henrytoone in https://github.com/cloudflare/itty-router-openapi/pull/100
* Add docs on how to stream ChatGPT responses by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/101
* Fix Regex parameter error message by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/103
## New Contributors
* @henrytoone made their first contribution in https://github.com/cloudflare/itty-router-openapi/pull/100
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.3...v1.0.4
v1.0.3
## What's Changed
* Fix error on mal formatted json request body
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.2...v1.0.3
v1.0.2
## What's Changed
* Add support for custom request bodies by @G4brym in https://github.com/cloudflare/itty-router-openapi/pull/98
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.1...v1.0.2
v1.0.1
## What's Changed
* Improve datetime error messages
* Fix special characters encoding in query string
**Full Changelog**: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.0...v1.0.1
v1.0.0
## What's Changed
* New Documentation website [https://cloudflare.github.io/itty-router-openapi/](https://cloudflare.github.io/itty-router-openapi/)
* Add [Zod](https://zod.dev) support everywhere!
* Add support for OAP 3.1
* Improve type hints
* Big improvements under the hood to make the code more maintainable going forward
* A lot of bug fixes
### Upgrading from an older version?
Migration guide to 1.0.0 [available here](https://cloudflare.github.io/itty-router-openapi/migrating-to-1.0/)!
暂无评论...