2 Comments
Aug 17·edited Aug 17

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.

Expand full comment
author

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.

Expand full comment