Hibernate Validator
Learn how to validate endpoints to avoid having problems when manipulating data.
We'll cover the following...
Introduction
When working on a REST endpoint, we’re expected to handle different inputs of various types. This could be a problem if the client consuming our API sends the wrong data. In this lesson, we’ll learn how to validate our endpoints to avoid having problems when manipulating data.
Let’s consider the application below, which is a basic API implementation for a car rental service.
* !target/*-runner !target/*-runner.jar !target/lib/* !target/quarkus-app/*
Car rental service example
In the above example, we add the resteasy-reactive-jackson
extension to ensure our beans are mapped to a valid JSON.
The example code allows us to get the list of cars and rentals alongside the ability to update it by creating new entries and removing existing entries.
Adding dependency
To ensure the ...