-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In the DPR backend we've been experimenting with Typebox through Elysia's deep integration with it.
I've made a start at converting the current schema to Typebox, albeit mostly automated using ts2typebox.
You can see how we've been using it in our backend tools here
Theres a scalar and swagger instance being generated from these files as well (slowly unfortunately at the moment!) and I've included those in that branch.
The main issue has been the fact that the main types are unions so the validation can get scary! Its the same issue with plain typescript as well when you're creating 'generic' applications eg
const application: PostSubmissionPublishedApplication = {}I can see some pros and cons for adding another layer but wanted to put it here for a suggestion. (The automated generation of openAPI files gets a +1 from me for sure though!)