aquaswim's blog

Develop With Code Generator (Contract Driven Development)

Background

Most of my programming careers i usually work alone, but on my current project i have a chance to work with other person in the same stack (sfx: Epic!). Our senior dev want us to use what he called Contract Driven Development (sfx: Wow!), what he mean by that 🤔️?

The f**k is Contract Driven Development?

So what is these 3 funny words actually mean? How do i do that? Am i going to die? Well except for the last question, i currently don’t have any proper explanation nor knowledge about that.

But here is the tools list for doing this development (currently i use golang and nodejs)

Tools List

  1. https://github.com/Clever/wag -> generate golang code from swagger

Another tools but for nodejs

  1. https://github.com/OpenAPITools/openapi-generator-cli -> this actually support lot of stuff other than nodejs

Too bad there is no codegenerator for typescript.

I will try to update this post about my progress (which mean i will not! 🤪️). Cya.

Update 17/04/2024

this is the tools i currently use

  1. golang server generate server from openapiv3
  2. typescript client generator