OpenAPI + Zod: Generate The Ultimate TypeScript API Clients Automatically

preview_player
Показать описание
By using the OpenApi spec we can really easy specify our API in a language agnostic way. But not only that. By leveraging openapi-generators like the openapi-zod-client we can easily create complete client or server implementations from our specification.

In this video we will discover how we can generate a completely typesafe http client in typescript using this powerful generator.

0:00 Intro
0:14 What is an OpenApi spec?
5:25 Let's generate some code
14:00 Outro
Рекомендации по теме
Комментарии
Автор

I'm working on a spring boot api with a sveltekit frontend right now so this is GOLD

mkrass
Автор

TS-Rest is also interesting. It uses Zod to create API contracts and is compatible with frameworks like NestJS, React and VueJS

cockpitconnect
Автор

Can you show us, how to use openapi to generate rtk query types and endpoints based on swagger? Would be so amazing

MrJettann
Автор

Thank you for sharing. It looks very handy, and for the db is there something like this?

llhull
Автор

Looks incredible!!! Currently I'm working on a project that already has Yup implemented. I don't need to install another validation library. Are there an openapi generators for other validation libraries, specifically Yup?

Noam-Bahar
Автор

I remember looking into this really cool tool some time ago, but this is only useful if the backend devs bother to write a good openapi doc

TianYuanEX