Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

apidays LIVE Australia - Contract-first API development with Spot by Francois Wout

2,325 views

Published on

apidays LIVE Australia - Building Business Ecosystems
Contract-first API development with Spot
Francois Wout, Developer Happiness Engineer at Airtasker

Published in: Technology
  • Are you looking for genuine love spell caster? Unbelievable! It's worked within few hours! Get ex boyfriend or husband back no matter why he left you by Powerful love spell caster dr unity.! After 2 year relationship with my boyfriend, he changed suddenly and stopped contacting me regularly, he would come up with excuses of not seeing me all the time. He stopped answering my calls and my sms and he stopped seeing me regularly. I then started catching him with different girls several times but every time he would say that he love me and that he needed some time to think about our relationship. But cannot stop thinking about him so I decided to go online and i saw so many good talk about this spell caster called Dr Unity and i contact him and explain my problems to him. He cast a love spell for me which i use and after 11 hours, my boyfriend came back to me and started contacting me regularly and we moved in together after a few months and he was more open to me than before and he started spending more time with me than his friends. We eventually got married and we now have been married happily for 3 years with a son. Ever since Dr Unity helped me, my partner is very stable, faithful and closer to me than before.You can also contact this spell caster and get your relationship fix. Here his contact, WhatsApp him: +2348055361568 Email him at: Unityspelltemple@gmail.com His website:https://unityspells.blogspot.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Get your husband back from the other woman....... Get up and get your husband back from the claws of another woman. Don’t let those years you have invested in your marriage go to waste. Stop sulking and take action. I just got my husband back through the help of Dr Unity love spell Experts. My name is Emily Sarah am from Tx,USA. My husband left me for another woman, This was just 3 years of our marriage. The most painful thing is that I was pregnant with our second baby. I wanted him back. I did everything within my reach to bring him back but all was in vain, I wanted him back so badly because of the love I had for him, I begged him with everything, I made promises but he refused. I explained my problem to my friend and she suggested that I should rather contact a spell caster that could help me cast a spell to bring him back , I had no choice than to try it. I messaged the spell caster called dr unity, and he assured me there was no problem and that everything will be okay before 11 hours. He cast the spell and surprisingly 11 hours later my husband called me. I was so surprised, I answered the call and all he said was that he was so sorry for everything that had happened He wanted me to return to him. He also said he loved me so much. I was so happy and went to him that was how we started living together happily again.thanks to dr unity . if you are here and your Lover is turning you down, or your husband moved to another woman, do not cry anymore, contact Dr.Unity for help now..Here his contact, WhatsApp him: +2348055361568 Email him at: Unityspelltemple@gmail.com His website:https://unityspells.blogspot.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I never believed in Spells or Magic until I met this great spell caster called DR ONIHA.. The man I wanted to marry left me 3 months after our wedding ceremony and my life was upside down. He was with me for 4 years and I really love him so much. He left me for another woman with no reasons. When I called him, he never picked up my calls and he didn't want to see me around him. I was helpless and didn't know what to do to get the man I love back in my life. I went online in search of help and I found the DR ONIHA website. I have to contact him. So when i told DR ONIHA what happened. he helped me to do some readings, and after the readings he made me to realize that the other woman has done some spells over my boyfriend and that is the reason why he left me.. he told me he will help me to cast a spell to bring him back. At first I was skeptical but I just gave it a try. In 4 days after which the spell was done by DR ONIHA, My boyfriend called me himself and came to me apologizing. I can't believe he can ever come back to me again but now i am happy he's back and we are married now and we live as a happy family. Am posting this to the forum if anyone needs the help of this great man, you can also contact him through this.  Email address: onihaspelltemple@gmail.com   Website: http://onihaspells.com Call/Whatsapp number: + 16692213962 
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Get Your Husband or Boyfriend Back and keep him permanently” Dr.unity is a true and real love spell caster. I just got my husband back through the help of Dr Unity love spell Experts. My name is Emily Sarah am from Tx,USA. My husband left me for another woman, This was just 3 years of our marriage. The most painful thing is that I was pregnant with our second baby. I wanted him back. I did everything within my reach to bring him back but all was in vain, I wanted him back so badly because of the love I had for him, I begged him with everything, I made promises but he refused. I explained my problem to my friend and she suggested that I should rather contact a spell caster that could help me cast a spell to bring him back , I had no choice than to try it. I messaged the spell caster called dr unity, and he assured me there was no problem and that everything will be okay before 11 hours. He cast the spell and surprisingly 11 hours later my husband called me. I was so surprised, I answered the call and all he said was that he was so sorry for everything that had happened He wanted me to return to him. He also said he loved me so much. I was so happy and went to him that was how we started living together happily again.thanks to dr unity . if you are here and your Lover is turning you down, or your husband moved to another woman, do not cry anymore, contact Dr.Unity for help now..Here his contact, WhatsApp him: +2348055361568 Email him at: Unityspelltemple@gmail.com His website:https://unityspells.blogspot.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Get Your Husband or Boyfriend Back and keep him permanently” Dr.unity is a true and real love spell caster. I just got my husband back through the help of Dr Unity love spell Experts. My name is Emily Sarah am from Tx,USA. My husband left me for another woman, This was just 3 years of our marriage. The most painful thing is that I was pregnant with our second baby. I wanted him back. I did everything within my reach to bring him back but all was in vain, I wanted him back so badly because of the love I had for him, I begged him with everything, I made promises but he refused. I explained my problem to my friend and she suggested that I should rather contact a spell caster that could help me cast a spell to bring him back , I had no choice than to try it. I messaged the spell caster called dr unity, and he assured me there was no problem and that everything will be okay before 11 hours. He cast the spell and surprisingly 11 hours later my husband called me. I was so surprised, I answered the call and all he said was that he was so sorry for everything that had happened He wanted me to return to him. He also said he loved me so much. I was so happy and went to him that was how we started living together happily again.thanks to dr unity . if you are here and your Lover is turning you down, or your husband moved to another woman, do not cry anymore, contact Dr.Unity for help now..Here his contact, WhatsApp him: +2348055361568 Email him at: Unityspelltemple@gmail.com His website:https://unityspells.blogspot.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

apidays LIVE Australia - Contract-first API development with Spot by Francois Wout

  1. 1. Contract-first API development The journey that led to Spot @fwouts
  2. 2. François Wouts Software EngineerSoftware EngineerDeveloper Happiness Engineer
  3. 3. Airtasker has three client apps
  4. 4. Cross-functional teams � �🏾 ��🏻 💻��🏼 💻��🏼 💻������🏼 UX PM
  5. 5. Typical development process
  6. 6. ��🏼 💻Done! The endpoint is /bookings. ��🏻♂Let's launch bookings on Web!PM … ��🏼 💻OK, I'll implement an API endpoint to fetch bookings.
  7. 7. ��🏼 💻Let me add this to the endpoint. � 👌 � �🏾 �� Where do I find the scheduled date? ��🏼 💻I've added `scheduled_date`. It's an int timestamp but it can be null too. …
  8. 8. 🚀
  9. 9.
  10. 10. 1 month later
  11. 11. ��🏻♂Let's launch bookings on iOS! ��🏼 💻/bookings ��🏼 💻What's the endpoint called? ��🏼 💻👌 PM
  12. 12. 🚀💥
  13. 13. ��🏼 💻It's expected for cancelled bookings. ��🏼 💻Why would it return null? 📱💥 JSON deserialisation error Expected int, got null for property scheduled_date ��🏼 💻😰
  14. 14. What happened? 💥 iOS app crashed due to unexpected response payload 🚫 Web engineer blocked until API implemented 🚧 API had to be reworked
  15. 15. Why did this happen? ⚠ API was not explicitly documented ⚠ 💔 Client engineers were not consulted
  16. 16. Contract-first development process
  17. 17. ��🏻♂Let's launch bookings on Web! ��🏼 💻Here is a draft API contract. PM … ��🏼 💻OK, I'll start designing an API to fetch bookings.
  18. 18. Draft API contract
  19. 19. � �🏾 �� How about adding scheduled_date too? ��🏼 💻👍 I added scheduled_date of type int or null. ��🏼 💻Done! Suggestion: scheduled_date of type string ��🏻 💻
  20. 20. � �🏾 ����🏻 💻✅ ✅ ✅ ��🏼 💻Thanks! I'll start implementing now. ��🏼 💻👍 I've added a pagination cursor. Will the endpoint be paginated? ��🏼 💻
  21. 21. REST API documentation formats
  22. 22. Sharing a doc Simple and helpful Very collaborative Leads to a better API - Details can be missed - Informal review process - Easily gets out of date
  23. 23. OpenAPI (Swagger)
  24. 24. OpenAPI (Swagger)
  25. 25. POST /users { "email": "f@zenc.io", "password": "hunter2" } Example: A simple API 201 Created { "user_id": "f123" }
  26. 26. OpenAPI (Swagger) definitions: CreateUserRequest: type: "object" properties: email: type: "string" password: type: "string" CreateUserResponse: type: "object" properties: user_id: type: "string" paths: /users: post: operationId: "createUser" parameters: - in: "body" name: "body" required: true schema: $ref: "#/definitions/CreateUserRequest" responses: "201": schema: $ref: "#/definitions/CreateUserResponse" definitions: CreateUserRequest: type: "object" properties: email: type: "string" password: type: "string" required: - "email" - "password" CreateUserResponse: type: "object" properties: user_id: type: "string" required: - "user_id"
  27. 27. OpenAPI (Swagger) Structured Official format Can describe most REST APIs (JSON or XML) - Fairly complex (spec = 56 pages long) - Difficult to write by hand - Difficult to review diffs
  28. 28. Source: openapi.tools
  29. 29. ● Designed for editing ● Still hard to review OpenAPI diffs GUI editors � �🏾 ��🏻 💻 �� ��🏼 💻 ��
  30. 30. Our REST API is JSON ● JSON = JavaScript Object Notation ● JavaScript types = TypeScript JSON TypeScript var payload = { "name": "Spot", "stars": 151 } type Payload = { name: string, stars: number }
  31. 31. Introducing Spot https://github.com/airtasker/spot
  32. 32. POST /users { "email": "f@zenc.io", "password": "hunter2" } Example: A simple API 201 Created { "user_id": "f123" }
  33. 33. @endpoint({ method: "POST", path: "/users" }) class CreateUser { @request request(@body body: CreateUserRequest) {} @response({ status: 201 }) success(@body body: CreateUserResponse) {} } type CreateUserResponse = { user_id: string; } type CreateUserRequest = { email: string; password: string; } paths: /users: post: operationId: "createUser" parameters: - in: "body" name: "body" required: true schema: $ref: "#/definitions/CreateUserRequest" responses: "201": schema: $ref: "#/definitions/CreateUserResponse" definitions: CreateUserRequest: type: "object" properties: email: type: "string" password: type: "string" required: - "email" - "password" CreateUserResponse: type: "object" properties: user_id: type: "string" required: - "user_id" OpenAPI for comparisonSpot (TypeScript)
  34. 34. type CreateUserRequest = { email: string; password: string; location?: Location; } type Location = { suburb: string | null; country: Country; } type Country = 'AU' | 'UK' | 'FR'; TypeScript is (almost) intuitive omittable field required but nullable string enum components: schemas: Country: type: string enum: - AU - UK - FR CreateUserRequest: type: object properties: email: type: string password: type: string location: $ref: '#/components/schemas/Location' required: - email - password Location: type: object properties: suburb: type: string nullable: true country: $ref: '#/components/schemas/Country' required: - suburb - country
  35. 35. Developer experience
  36. 36. Spot Structured Easy to write Easy to review diffs Editor autocomplete - Limited to JSON
  37. 37. Spot Workflow 1. Draft API contract with Spot (e.g. in VS Code) 2. Send a PR to interested engineers to gather feedback 3. Merge the PR 4. Then in parallel: ○ API engineer implements the new API ○ Client engineers implement new features based on the API Upfront API design facilitates parallel development
  38. 38. What about OpenAPI? ✅ Spot generates OpenAPI!
  39. 39. Tooling ● Documentation ○ spot docs api.ts ● Client code generation ○ leveraging OpenAPI client generators (e.g. SwiftGen) ○ no more implementation mistakes! ● API contract testing ○ https://github.com/airtasker/spot/wiki/Contract-Testing ● Linting based on API guidelines ○ spot lint api.ts ● Mock API server ○ spot mock api.ts
  40. 40. Probably. ● No need to be familiar with TypeScript ○ quickly adopted at Airtasker by Ruby, Kotlin, Swift engineers ● Easy to integrate into your existing PR review process ● ⚠ Spot is only for JSON REST APIs ○ alternative to GraphQL, gRPC and Thrift ○ Spot is inspired by gRPC ● It's still early days (our docs need some ❤) Is Spot good for my team?
  41. 41. Want to learn more? Spot is open source! https://github.com/airtasker/spot
  42. 42. Thank you! @fwouts Come work with me at Airtasker! We're hiring: ● Senior Software Engineers ● VP of Engineering https://fwouts.com

×