4

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 ?

Fabien Salles
  • 1,101
  • 15
  • 24

0 Answers0