API Fest 2022 (Day 2 - Jan 27th) 🎉 Awesome session by @clairefroe on "Coding an API using an API Schema" #PostmanStudent #APIFest @getpostman Takeaways from Claire's session and API First Approach 🧵 (A thread)
1. HONOR THE INTERFACE Claire gave an example of a vending machine. The end users only care about how it feels like a vending machine. You can implement it however you want, like keep a human inside the vending machine😂
2. API First Approach The first step is to define a Schema and use it a single source of truth! You will use to build the API based on the rules and methods(GET, PUT, POST AND DELETE) defined in the API schema(Open API 3.0 in our case). (1/4)
Following the API First Approach with postman is a perfect combination. Claire showed by using fastify-openapi-glue to validate the request data from the API Schema avoiding wasting time to write checks for each and every API route. Great hack! (2/4)
But firstly what is API First Approach? It is basically building your end product around the APIs as supposed to how companies first build the platform/product then build an API as an afterthought. (3/4) postman.com/use-cases/api-…