Open CFitzsimons opened 6 years ago
@JackTilley92 Just a suggestion but libraries like ajv
allow us to use json schema to validate data. We could write a small json schema and use that to validate data we get back from the scraper.
ajv: https://github.com/epoberezkin/ajv json schema: http://json-schema.org/
JSON Schema is probably a bit overkill for what we're doing here but it is extremely useful in a variety of languages.
Ideally each scraper should output the same set of data. Something in the form of:
We'll need to verify that all the incoming data is the correct type (mostly, if not all strings) and that they are not null or empty.