3 ms·
What are you using to codegen the types?
by goodoldneon 4y ago
What are you using to codegen the types?
- darepublic 4y agoI haven't done it yet. I've just set up a monorepo and prototyped sharing of types from backend to frontend. Googling it seemed like there were some decent options for type generation from swagger, i.e. https://github.com/drwpow/openapi-typescript https://github.com/drwpow/openapi-typescript
- goodoldneon 4y agoTake a look at https://github.com/bcherny/json-schema-to-typescript https://github.com/bcherny/json-schema-to-typescript, too. I used it successfully at a previous job. IIRC, I had to write some code to convert OpenAPI to JSON Schema but it wasn’t onerous