Server-side API's

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.).

compojure-api

We are going to use the compojure-api library and its Leiningen template to quickly build our API.

Compojure API overview

Compojure API documentation

Prismatic schema

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.

Swagger UI

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).

References

Alternatives

results matching ""

    No results matching ""