Swagger and MapStruct

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


Swagger Formats

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.

Exclude class from JaCoCo coverage

JaCoCo’s exclude configuration works with classes, so the .class extension is relevant in specifying the path.