The document discusses documentation-driven development for APIs. It describes the benefits of designing API documentation like OpenAPI specifications before building servers and clients. It also discusses how to validate implementations against documentation using tools like Dredd and schemathesis. Additionally, it covers building clients using mock servers from tools like Prism, Stoplight, Postman, MockLab, and microapis.io. The presentation aims to demonstrate how documentation-driven development can help deliver successful API integrations.
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Delivering successful API integrations with documentation-driven development
1. Delivering successful API
integrations with
documentation-driven
development
• Jose Haro Peralta
• Full stack consultant
• Cofounder of microapis.io
@JoseHaroPeralta
@microapisio
PyCon India 2021
2. $ whoami
35% discount code: TBD
• I’m Jose
• Independent contractor | London
• Full stack developer
• Microservices and APIs
@JoseHaroPeralta
@microapisio
4. Connect with Jose
• Twitter: @JoseHaroPeralta
• GitHub: @abunuwas
• Medium: @joseharoperalta /@python-geek
• LinkedIn: https://www.linkedin.com/in/jose-haro-peralta/
@JoseHaroPeralta
@microapisio
5. This
presentation
covers
• Complexity of API integrations
• What is documentation-driven development and why
it matters?
• How to you can adopt documentation-driven
development?
• REST API (OpenAPI)
• FastAPI
• Validate server implementation with Dredd and
schemathesis
• Build API clients with mock servers
• Continuous Integration and deployment to Heroku
@JoseHaroPeralta
@microapisio
Repository for this presentation:
https://github.com/abunuwas/pycon-india-2021
7. Major causes of API
integration failures
• Backend-driven API development
• Lack of separation between API layer and the rest of the
app
• Misunderstandings about the API
• Lack of validation
9. What is API documentation?
REST -> OpenAPI
GraphQL -> Schema Definition
Language
gRPC -> Protobuf
10. What is
documentation-
driven
development?
• Also known as design-first, API-first
or contract-first approach
• Design and produce the API
specification first
• Build your server and your API
client (if you have one) against the
specification
• Use the specification to validate
your implementation
32. Links
• Microservice APIs in Python by J Haro (mng.bz/nz48)
• Building and deploying reliable APIs with FastAPI by J Haro
(https://www.twitch.tv/videos/1088283640)
• Documentation-driven development for APIs by J Haro
(https://link.medium.com/m2A3rOxUfib)
• Developing API clients doesn’t need to be a pain by J Haro
(https://link.medium.com/0B9vt7DUfib)
• Design patterns for modern web APIs by D Luecke
(https://blog.feathersjs.com/design-patterns-for-modern-web-apis-1f046635215)
• The design of web APIs by A Lauret (https://www.manning.com/books/the-
design-of-web-apis)
• API Design Patterns by JJ Geewax (https://www.manning.com/books/api-design-
patterns)