Generate Spring Boot REST Client with Swagger 1. Introduction In this article, we’ll use the Swagger CodeGen project to generate a REST client from an OpenAPI/Swagger spec file. Also, we’ll create a Spring Boot project, where we’ll use generated classes. We’ll use the Swagger Petstore API example for everything. 2.… Continue Reading spring-boot-rest-client-swagger-codegen

Setting Up Swagger 2 with a Spring REST API 1. Overview When creating a REST API, good documentation is instrumental. Moreover, every change in the API should be simultaneously described in the reference documentation. Accomplishing this manually is a tedious exercise, so automation of the process was inevitable. In this… Continue Reading swagger-2-documentation-for-spring-rest-api

Eliminate Redundancies in RAML with Resource Types and Traits REST RAML 1. Overview In our RAML tutorial article, we introduced the RESTful API Modeling Language and created a simple API definition based on a single entity called Foo. Now imagine a real-world API in which you have several entity-type resources,… Continue Reading simple-raml-with-resource-types-and-traits

Error Handling for REST with Spring 1. Overview This article will illustrate how to implement Exception Handling with Spring for a REST API. We’ll also get a bit of historical overview and see which new options the different versions introduced. Before Spring 3.2, the two main approaches to handling exceptions… Continue Reading exception-handling-for-rest-with-spring