Chapter 4: Writing Business Logic for APIs
We discussed APIs using OpenAPI in the previous chapter. API interfaces and models were generated by the Swagger Codegen. In this chapter, you will implement the API's code in terms of both business logic and data persistence. You will write services and repositories for implementation and also add hypermedia and ETags to API responses. It is worth noting that the code provided only consists of the important lines and not the whole file in the interest of brevity. You can always access the links given below the code to view the complete file.
This chapter includes the following topics:
- Overview of the service design
- Adding repository components
- Adding service components
- Implementing hypermedia
- Enhancing ...
Get Modern API Development with Spring and Spring Boot now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.