At the moment, the payload received on the /measures endpoint are passed through to MongoDB. They need to be validated and the client needs to be notified if there are problems. The Swagger specs already define constraints. Also, generated code contains validation annotations for these constraints. The problem is that at the moment, Spring Boot does not use them.