Real-world behind Schema first vs Code first (Part 1)

Anastasiia Smirnova
1 min readSep 20, 2022

--

If you are looking into using OpenApi for your API development, you’ve probably seen many articles about which approach you should take — Design first or code first.

Unfortunately, neither. None of these approaches is usable in a real-world scenario. This is how they are usually presented:

Code First approach

Get requirements and throw them into the code: only code, no design, no planning, no documentation, no communication with other team members, but still very fast.

Schema First approach

Get requirements and start designing: spend lots of time thinking about design, planning and collaborating with stakeholders, feedback sessions and discussions with team members, no code, only some standard machine-readable language-agnostic specification, not fast.

The picture looks black and white to me. The real world is always grey, so you should take the best from both approaches, especially keeping in mind your context — language, frameworks that you use, number of developers, developers' maturity, customers, market, etc.

--

--