Releases: cloudflare/chanfana
Releases · cloudflare/chanfana
v1.1.0
What's Changed
Now you can get full type hint and type check on the data
argument of every endpoint, learn more here!
export class TaskFetch extends OpenAPIRoute {
static schema = {
parameters: {
taskSlug: Path(Str, {
description: 'Task slug',
}),
},
}
async handle(request: Request, env: any, context: any, data: DataOf<typeof TaskFetch.schema>) {
// full type hint for query, path, header, and request body parameters!
data.params.taskSlug
// ...
}
}
Full Changelog: v1.0.14...v1.1.0
v1.0.14
v1.0.13
1.0.13
What's Changed
- Add support for defining multiple content types in responses
- Add support for defining headers in responses
Full Changelog: v1.0.12...1.0.13
v1.0.12
v1.0.11
v1.0.10
What's Changed
- Fix all parameters not being detected in non openapi routes
Full Changelog: 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: v1.0.8...v1.0.9
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
Full Changelog: v1.0.6...v1.0.7