Dan Popa. What I do in Software Development. Employed at H&M

How I Autogenerate TypeScript for API Contracts


Writing types for the backend response in typescript is tedious.

That’s why in my team we switched to Open Api Schema and generate types from that.

The flow

1. Backend provides the schema

Backend has two options:

  1. have the yaml schema as a file
  2. have swagger or something similar.

In the first case we as frontend go get this file and put in our repo.

In the second case if it’s swagger we get the json schema first and then convert to yaml with any convert tool swagger pic

Read more ⟶

What I Use to Make Diagrams


There’s tools like Miro and Lucidchart which are very good for making diagrams and have cool multiplayer(gen z talk) features but with 2 major drawbacks:

  • separate from code
  • not free

The payed part can be ignored even though it’s a pain to switch tools every new company and not being to use it in personal projects but the separation from code does not cut it for me.

I’ve been using draw.io and exporting pngs for quite a while but recently I discovered a vscode plugin that fixed it all for me.

Read more ⟶