Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building API Tooling that Doesn't Suck

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Building API Tooling that Doesn't Suck

Scott Feinberg

April 22, 2015

Transcript

38 slides
  1. Building  API  Tooling     That  Doesn’t  Suck   A

     Sco8  Feinberg  Produc<on   @sco8efein    
  2. What  is  good  API  Tooling?     How  do  I

     build  good,  scalable   API  tooling?   @sco8efein    
  3. Documenta<on   1.  Tutorials   2.  Reference  Docs   3. 

    Explana<on/Use  Cases   @sco8efein    
  4. Document  every  resource   structure     Visual  Duplica<on  is

     OK-­‐ don’t  make  me  jump  around  
  5. Document  every  API   Request  +  Response     Explana<ons

     and  examples   for  each  parameter  
  6. Par<ally  Code  Generated  Spec   Generate  +  Update  Code-­‐Level  

    Parts  of  the  Spec     Leave  Blanks  for  Documenta<on   Fields   @sco8efein    
  7. Grape  to  Swagger       w/  grape-­‐swagger    

    Rails  Serializers  to  Swagger     w/Swaggard     @sco8efein    
  8. Hand-­‐Built  Specs   Workflow:  Add  a  new  resource,  commit  a

     new   spec  for  it     CLI  Tools:   •  Scaffolding   •  Concatena<ng  Files   •  Valida<on   @sco8efein    
  9. documenta<on-­‐generator  -­‐r  ki8en     Created  raml_specs/ki8en.raml   Created  markdown_documenta<on/ki8en.markdown

      Created  schemas/ki8en_request.json   Created  schemas/ki8en_response.json   Created  examples/ki8en.json   @sco8efein    
  10. Takeaways   •  Have  an  API  Spec   •  Build

     tooling  around  your  documenta<on,  spec   genera<on,  etc  to  minimize  duplicated  effort  and   keep  everything  up  to  date   •  For  your  CLI  tool  genera<on:  h8ps://github.com/ codegangsta/cli   •  Good  API  Tools  that  scale  allow  you  to-­‐   –  Update  API  endpoints  faster   –  Keep  everything  consistent   –  Decrease  maintenance  effort   @sco8efein    

More Decks by Scott Feinberg

Other Decks in Technology