We can build an Application Programming Interface (API) in Clojure by building on the techniques we have learnt as we built our server-side web applications (ring, compojure, etc.).
We are going to use the
compojure-api library and its Leiningen template to quickly build our API.
Schema validation defines the shape of any data that the API will respond with as well as any data that is sent along with a request.
Self-documenting with Swagger
This template contains Swagger that documents the API's you are creating and ring-swagger constructs the documentation as you create your code.
lein-ring Reloaded workflow
lein-ring is a plugin for Leiningen that will reload code changes into a running web application server (i.e. Jetty).
- Getting started with Compoure API
- RESTful CRUD APIs Using Compojure-API and Toucan - part1
- RESTful CRUD APIs Using Compojure-API and Toucan - part2