In this issue, I lay down my thoughts and ideas on the concept of schema first design approach in Typescript, where we generate our Typescript types from schemas which act as a single source of Truth.
Have you looked at ways to generate Typescript types from OpenAPI specs? Often you need to create an OpenAPI spec for your users anyway, so this seems like a promising approach to me. But I haven't tried it myself yet.
I have been meaning to look into that and write a few write ups around that, but it's a great way for approaching schema first type generation. Another approach is to use Zod or Valibot or similar tools to generate openapi specs and get static types as well.
Have you looked at ways to generate Typescript types from OpenAPI specs? Often you need to create an OpenAPI spec for your users anyway, so this seems like a promising approach to me. But I haven't tried it myself yet.
I have been meaning to look into that and write a few write ups around that, but it's a great way for approaching schema first type generation. Another approach is to use Zod or Valibot or similar tools to generate openapi specs and get static types as well.