Validate ElasticSearch data with the mapping

233 Views Asked by At

For unit testing purpose, I would like to reuse the ElasticSearch mapping in order to validate a sample of data and make sure the structure remains consistent.

Is there a solution like what we could have to validate a json schema ?

I don't want to use a real elasticsearch, make an insert request and check the integrity of the data after. And I don't want to be too decorrelated from my source code and create a json schema from the ES mapping just for my tests.

Any ideas ?

0

There are 0 best solutions below