In this session we will review all of the RESTful capabilities of ColdBox. We will then go into modeling mode and model a RESTful service using the ColdBox Relax Module and finally implement the running service. But there's more, we will then document the entire service for you.
10. API Documentation
• Helps to define coding conventions
• Allows API evolution to maintain consistency and
standards
• Decreases onboarding time and increases
adoption for API consumers
• Provides flexibility in development sprint planning
by allowing members, owners, and stakeholders
to visualize the product and ensure needs are met
RELAX
A business case for developers:
11. Next Generation
RELAX
• Open and transferrable documentation using OpenAPI
(fka Swagger)
• Maintain backward compatibility for RelaxDSL (for a
time)
• Minimize the need for duplication of effort
• Streamline the drill-down process to the response level
• Make documentation authoring and revisions pain-free
13. Next Generation
RELAX
Drill down quickly
to paths, methods,
schemas and
samples
References and
internal document
links
Extend OpenAPI
schema to
(near)infinite
17. API Development
Lessons Learned:
• Maintain consistency in responses to minimize conditionals
in consumption
• Implement your paging and throttling strategies *NOW*!
• Standardize error handling
• Less is *more* (Massive data dumps kill your API)
• Marshall deeply nested arrays into hashmap representations,
whenever possible. Recursion kills.
20. API Development
Lessons Learned:
200 - “You wanted it... Here you go, buddy:”
201 - “I've created something new for you!”
202 - “Your request is accepted, heres a URL so you
can check the status:”
203 - “Here's a record, but we haven't confirmed
persistence”
204 - “I deleted what you told me. Now it's nothing,
so... Here's nothing!:”
205 - “A record has been updated while you were
slacking off. Re-request the data and refresh your
view.”
206 - “There are, like, a gazillion rows, man. Here's 25
of them so I don't break