Maintaining types at two places is a big ass pain if you're using a separate backend with modern frameworks like nextjs or sveltekit, this a simple yet effective solution that always works with me, and it also enables api first development for your backend, which personally has led to better backend design
SvelteKit: https://www.launchnow.pro/blog/sveltekit-openapi-sdk-generation
NextJS: https://www.launchnow.pro/blog/nextjs-openapi-sdk-generation
while this does not prevent duplication, but it saves a ton of time!
Top comments (0)