cloudflare / cloudflare/chanfana

lacking type safety in the openapi route object

Open
#110 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
766
Forks
70
Avg merge
25m
Merged PRs (30d)
4

Description

the static schema does not match the the request type, and does not have typing on the handle parameters

makes this library really hard to use

it's also not clear how to describe the parameters!

and there are multiple places where params can be defined!
image

need to make better use of typescript for this to be nice to use

i would also recommend the schema not being static so you don't have to compute the schema and construct everything until the route is hit

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the openapi route object, request type, and handle parameters described in the issue, then trace the multiple places where parameters can be defined. Compare the static schema with the request type and clarify how parameters should be described; done means the route API has consistent, useful TypeScript typing and a defined parameter model.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.