Summary
In this chapter, we opted for the design-first approach for writing the RESTful web services. You learned how to write an API description using OAS and how to generate models and API interfaces using the Swagger Codegen tool (using the Gradle plugin). We also implemented a Global Exception Handler to centralize the handling of all the exceptions. Once you have the API Java interfaces, you can write their implementations for business logic. Now, you know how to use OAS and Swagger Codegen for writing RESTful APIs. You have also learned how to handle exceptions globally.
In the next chapter, we'll implement fully fledged API interfaces with business logic with database persistence.