Swagger and MapStruct

Update: This post is now available at a new location:
https://blog.ngeor.com/2018/04/29/swagger-and-mapstruct.html

I’ve been working lately on a project with a few services (or microservices, if you like to play buzzword bingo). I wanted to share some thoughts on how using Swagger together with MapStruct can make things easier.

Continue reading Swagger and MapStruct

Advertisements

Using swagger code generator with maven

Update: This post is now available at a new location:
https://blog.ngeor.com/2018/04/21/using-swagger-code-generator-with-maven.html

Following up the previous post about swagger, in this post I’m using the maven plugin version of swagger code generator.

Continue reading Using swagger code generator with maven

Swagger Formats

Update: This post is now available at a new location:
https://blog.ngeor.com/2018/04/21/swagger-formats.html

Some handy format combinations with Swagger:

type: string
format: byte
Creates a property of type byte[] (but it is serialized as a string).

type: integer
format: int64
Creates a property of type Long.

type: string
format: date-time
Creates a property of type OffsetDateTime (when using the java8 date library).

type: string
format: date
Creates a property of type LocalDate.

Building a REST API with Swagger and Spring Boot

Update: This post is now available at a new location:
https://blog.ngeor.com/2018/04/15/building-a-rest-api-with-swagger-and-spring-boot.html

In this post, I’ll be using Swagger to build a REST API with Java and Spring Boot. Swagger is an API framework. It uses a YAML-based language to define an API and it has a code generator that supports multiple languages.

Continue reading Building a REST API with Swagger and Spring Boot