Skip to content

You want standards for your internal APIs but big frameworks and reflection magic are not your friends? Browse this project to get a template for it.

License

Notifications You must be signed in to change notification settings

worldline/project-bookworm

Repository files navigation

Project Bookworm

Demo project that showcases JSON:API with Spring Boot and plain Java.

Content

REST with JSON API - justification

JSON API is a specification for building APIs in JSON. Plain JSON lacks a standard way for structuring of request and responses, error handling, filtering and pagination. JSON API defines these standards and provides additional features to reference and link resources, combine resources, save bandwidth and reduce the number of requests...

It often makes sense to distinguish between internal and external APIs. An external API is used by third parties, like a browser, a mobile app, a partner while an internal API is used by your own services, maybe in the same project. The requirements for an external API are usually higher than for an internal one. Specifically, bandwidth and latency concerns as well as a self-explanatory and discoverable format are more important for an external API.

This project and the accompanying blogpost focus on internal APIs omitting some of the richer features of JSON API.

the project

  • follows the baseline w.r.t. HTTP verbs, usage of data and errors objects
  • showcases relationships in a few examples but does not enforce them everywhere
  • makes use of complex / nested objects inside the attributes block (read more)
  • uses a Resource Oriented Approach to provide endpoints but takes some liberty compared to gold standard RESTfulness (read more)
  • implements a layered architecture but the data and business layer are just mocks/stubs

About

You want standards for your internal APIs but big frameworks and reflection magic are not your friends? Browse this project to get a template for it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages