Contents

Contract First

Contents

Contract First
Why?

Unambiguous requirements
Strong Guarantees
Enhanced Collaboration
Parallel workstreams
Code generation

Old Steps

OpenApi specification first
Publish the spec
Use openApi generator

New steps (at the beginning of old steps )

Design with Figma
Build OpenApi spec and fake it

Tool for testing and validation

schemathesis

Bad experiences with generate code?

Then customize the generator (templates) and publish them

Lessons Learned

- Design First
- User Experience first
( if you design first things as graphql becomes unnecessary)
- Get feedback from users
- Generate Server Code
- Generated code is disposable, you don’t even need to commit it , since it is generated on building time
- publish client libraries , your clients will not have to worry about how to connect to your api, instead they will love you

Use Case

Comment on 2020-12-04:
Ref: https://twitter.com/infosec812/status/1334863961611788288?s=21 · no longer on X (seen 2026-11-20)

https://www2.slideshare.net/DevenPhillips/why-you-should-be-doing-contractfirst-api-development

Issue #69 in emecas/commitit, open, opened on 2020-12-04. Labels: WIP, TODO.
https://github.com/emecas/commitit/issues/69


Source: issue #69 in emecas/commitit, opened on 2020-12-04.