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.

Answer from luboskrnac on Stack Overflow
🌐
Medium
medium.com › @mohommad.belal › json-schema-validator-using-java-springboot-667ed42480d5
JSON Schema Validator using Java SpringBoot. | Medium
May 11, 2024 - We will create a RestController with a Post endpoint (“/validate”) and request body can be a valid JSON.
Discussions

How to validate incoming request body JSON fields and POJO class fields in the endpoint
You can use spring-validation library for this More on reddit.com
🌐 r/SpringBoot
12
7
March 16, 2023
does anyone know the JSON schema for application.yaml for spring boot?
this plugin provides tons of Jason schema for both yamlls and jsonls. Maybe it could help you More on reddit.com
🌐 r/neovim
9
2
January 7, 2023
🌐
Medium
medium.com › @AlexanderObregon › data-validation-for-api-requests-in-spring-boot-with-json-schema-c109acbd325c
Data Validation for API Requests in Spring Boot with JSON Schema
August 16, 2025 - JSON Schema validation in Spring Boot works by fitting a clear set of checks into the request pipeline before mapping happens. The schema is prepared ahead of time, incoming JSON is read and tested against it, and only matching data moves forward ...
🌐
Baeldung
baeldung.com › home › json › introduction to json schema in java
Introduction to JSON Schema | Baeldung
November 27, 2024 - In this tutorial, we'll see how ... are 30% off until 31st March, 2026 ... JSON Schema is a declarative language for validating the format and structure of a JSON Object....
🌐
MS Charhag
mscharhag.com › spring › json-schema-validation-handlermethodargumentresolver
Integrating JSON Schema validation in Spring using a custom HandlerMethodArgumentResolver
We learned how to integrate JSON Schema validation into a Spring Boot application by implementing a custom HandlerMethodArgumentResolver. Within our implementation we validate the JSON request body against a JSON Schema before it is passed as argument to the controller.
🌐
GitHub
github.com › JanLoebel › json-schema-validation-starter
GitHub - JanLoebel/json-schema-validation-starter: Spring Boot 2 Starter for Json Schema Validation
After that simply create a json-schema and put it into e.g.: resources/jsonschema/book.json. The last step is now to let your entity know that it should be validated and which schema it should use. @JsonSchemaValidation("classpath:jsonschema/book.json") public class Book { private String title; private String author; }
Starred by 9 users
Forked by 6 users
Languages   Java 100.0% | Java 100.0%
🌐
vvauban
blog.vvauban.com › blog › spring-boot-json-schema-validation-networknt-in-action
🚀🧰 SPRING BOOT JSON SCHEMA VALIDATION — NETWORKNT IN ACTION
November 9, 2025 - ▪️ Validation step: controller passes the payload to a service that runs networknt JSON Schema validation. ▪️ Fail path: if rules are violated, the API returns 400 with a list of exact fields and reasons (e.g., “charactersCount must ...
Find elsewhere
🌐
Jamie Tanna
jvt.me › posts › 2021 › 12 › 20 › validate-json-schema-spring-response
Validating a Spring (Boot) Response Matches JSON Schema with MockMVC · Jamie Tanna | Software Engineer
December 20, 2021 - Today I've been looking at how you can do this through MockMVC and found that although it's not a first-class citizen (at time of writing) with Spring's ContentResultMatchers, it's actually straightforward to do using Rest Assured's standalone json-schema-validator dependency.
🌐
GitHub
github.com › UnitVectorY-Labs › jsonschema4springboot
GitHub - UnitVectorY-Labs/jsonschema4springboot: Add JSON Schema Validation to Spring Boot 3 with Annotations
While this example shows a draft-07 JSON Schema example, all versions of JSON Schema supported by networknt/json-schema-validator can be used. { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "value": { "type": "string", "pattern": "^[a-zA-Z0-9]+$" } }, "required": ["value"], "additionalProperties": false } The following example shows a controller that utilizies the prior JSON Schema with a nominal API implementation. package example; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; import org.spring
Author   UnitVectorY-Labs
🌐
javathinking
javathinking.com › blog › json-schema-validation-in-spring-rest-apis
How to Validate JSON Schema in Spring Boot REST APIs: A Guide to Request Payload Validation — javathinking.com
While Spring Boot offers built-in support for Bean Validation (via JSR 380 annotations like @NotNull or @Email), JSON Schema validation provides a more flexible, language-agnostic way to define and enforce data structures.
🌐
DZone
dzone.com › software design and architecture › integration › how to perform json schema validation in api testing using rest-assured java
How To Perform JSON Schema Validation
July 8, 2024 - Next, let's talk about the properties block inside the JSON Schema. The following block states that bookingid should be in the root object and its type should be integer . Hence, in response, it is expected that the value in this field should be an integer only. So, in case this type is changed to any other data type like String ,Object ,longor float, schema validation will fail and we would be able to identify the issue in the schema right away.
🌐
GitHub
github.com › novotnyr › spring-jsonschema-validation
GitHub - novotnyr/spring-jsonschema-validation: Adds support for JSON Schema validation in Spring MVC Controllers
By convention, the request parameter will be validated against JSON schema available in the CLASSPATH, in the BoxController#register.json file.
Starred by 7 users
Forked by 3 users
Languages   Java 100.0% | Java 100.0%
🌐
GitHub
github.com › rzats › json-schema-validator
GitHub - rzats/json-schema-validator: :card_index: A REST service for validating JSON documents against JSON schemas. · GitHub
A REST service for validating JSON documents against JSON schemas. Uses Spring Boot for the RESTful web service and RocksDB with the RocksJava bindings as persistent storage.
Author   rzats
🌐
Baeldung
baeldung.com › home › http client-side › json schema validation with rest-assured
JSON Schema Validation with REST-assured | Baeldung
June 3, 2025 - The json-schema-validator module of REST-assured gives us the power to perform fine-grained validation by defining our own custom configuration rules.
🌐
Apache Camel
camel.apache.org › apache camel › camel components › 4.14.x (lts) › components › json schema validator
JSON Schema Validator :: Apache Camel
The JSON Schema Validator component performs bean validation of the message body against JSON Schemas v4, v6, v7, v2019-09 draft and v2020-12(partial) using the NetworkNT JSON Schema library (https://github.com/networknt/json-schema-validator).
🌐
Spring
docs.spring.io › spring-data › mongodb › reference › mongodb › mapping › mapping-schema.html
JSON Schema :: Spring Data MongoDB
There are already some predefined and strongly typed schema objects (JsonSchemaObject and JsonSchemaProperty) available through static methods on the gateway interfaces. However, you may need to build custom property validation rules, which can be created through the builder API, as the following example shows:
🌐
Java Code Geeks
javacodegeeks.com › home › enterprise java
JSON Schema validation in Java - Java Code Geeks
August 6, 2020 - A Jackson ObjectMapper instance is used to read the JSON data from the InputStream and parse it into a JsonNode object. From the JsonSchemaFactory we can obtain a JsonSchema object which can then be used validate the JsonNode.
🌐
GitHub
github.com › nusmanov › spring-boot-json-schema-validation
GitHub - nusmanov/spring-boot-json-schema-validation
{ "$id": "https://example.com/person.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Person", "type": "object", "properties": { "firstName": { "type": "string", "description": "The person's first name." }, "lastName": { "type": "string", "description": "The person's last name."
Author   nusmanov
🌐
DZone
dzone.com › coding › languages › how to validate json request body in spring boot
How To Validate JSON Request Body in Spring Boot
October 30, 2022 - From Listing 3.1 above, we used a Map<String, String> to store the rules for each expected request field. The key of the map is the name of the field as the API user should supply it, while the value contains the validation rules.