API Code Generation
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

API Code Generation

  • 4,245 views
Uploaded on

How to generate nodejs API consumer code from a Postman collections, with the help of the API Blueprint.

How to generate nodejs API consumer code from a Postman collections, with the help of the API Blueprint.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,245
On Slideshare
4,152
From Embeds
93
Number of Embeds
2

Actions

Shares
Downloads
12
Comments
0
Likes
4

Embeds 93

https://twitter.com 89
http://www.slideee.com 4

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Bruno Pedro 13 February 2014 BarcelonaJS API Code Generation http://www.flickr.com/photos/iprozac/3609806359/
  • 2. Bruno Pedro Web and Cloud Computing Technologist with over ten years’ experience. CTO of GetApp. Editor at APIUX.com. http://brunopedro.com/
  • 3. Summary • Postman • API Blueprint • Code generation • Questions
  • 4. Postman • Powerful HTTP client • Chrome application • Advanced request builder • History, Collections, Authentication, Documentation, …
 
 http://www.getpostman.com/
  • 5. Postman
  • 6. Postman
  • 7. Postman
  • 8. Postman
  • 9. Postman
  • 10. Postman
  • 11. Postman
  • 12. API Blueprint • Web API Language • Markdown syntax • Documentation + method description • Powerful tooling
 
 http://apiblueprint.org/ !
  • 13. API Blueprint • Testing with Dredd
 
 • HTML docs with aglio
 
 • Mock server with Contractor
  • 14. API Blueprint
  • 15. API Blueprint
  • 16. Code Generation
  • 17. Code Generation • collection
 
 
 • markdown
 
 
 • functions
  • 18. Code Generation • collection
 
 
 • markdown
 
 
 nodeunit • functions
  • 19. postman2apiblueprint • Reads Postman collection JSON • API endpoints • HTTP methods (GET, POST, etc) • Headers • Parameters
 • Converts to API Blueprint
  • 20. postman2apiblueprint
  • 21. apiblueprint2nodejs • Reads API Blueprint markdown • Uses protagonist • Converts markdown into JSON
 
 • Generates nodejs code from JSON !
  • 22. apiblueprint2nodejs
  • 23. Future work • Explore Postman Collection runner • Richer output to API Blueprint • Better code generation • Reverse operation?
  • 24. Questions? Thank you!