swagger-check

Build status: Build Status codecov Maven Central

Toolbox for property based testing of an API specified with swagger

The problem

Swagger is a nice way to specify REST APIs, but it just can not keep up with all the different libraries commonly (or not so commonly) used to implement this API.

If you generate your Swagger specifications automatically you probably do not need this toolbox. But if you write your Swagger specifications by hand and implement them later you might encounter the problem how to ensure that the specification matches reality in the long term. swagger-check might help you in this case.

Details

swagger-check is build around Scala Check and contains two main additions:

As an additional party gimmic there is also ein generator to generate matches to a regex that you might consider useful for other things.

Usage

Add the following to your build.sbt

libraryDependencies += "de.leanovate.swaggercheck" %% "swagger-check-core" % "0.99.13" % "test"

Examples

You can find an example Play2 project in the examples folder.

Some implementation notes

Project structure

The project is now separated in modules to (eventually) support a multiple frameworks without ending in a dependency hell.

Compatibility with play

License

MIT Licence