Json schema validation in Spring REST APIs

You can also look at Rest Assured Json Schema validator

https://www.baeldung.com/rest-assured-json-schema


If you take a look at JSON schema site, there are only two libraries for validation in Java.

  1. The one that Jorge Campos suggested is mature, but looking for new maintainer: https://github.com/fge/json-schema-validator
  2. Second one is relatively new: http://github.com/everit-org/json-schema

I was recently in situation where I had to choose one or the other and I picked first option. It is being used also by Rest Assured library under the hood.