OpenAPI 3 and 3.1 schema generator and validator for Cloudflare Workers
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.1.0...v1.1.1
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: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.14...v1.1.0
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.13...v1.0.14
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/1.0.13...v1.0.13
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.12...1.0.13
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.11...v1.0.12
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.10...v1.0.11
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.9...v1.0.10
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.8...v1.0.9
Full Changelog: https://github.com/cloudflare/itty-router-openapi/compare/v1.0.7...v1.0.8