onaio / gisida

JavaScript library that converts MapSpec layers to beautiful, interactive maps using Mapbox GL
http://gisida.onalabs.org/
Apache License 2.0
10 stars 3 forks source link

Implement schema validations for the various Gisida components. #508

Open kahummer opened 3 years ago

kahummer commented 3 years ago

Most support issues on gisida are data related. Implementing a shema validation like superstruct to return more informative message for the data team will help reduce support time on gisida. This ticket tracks implementation of such validators on various components

kelvin-muchiri commented 3 years ago

@kahummer This is a good idea....how do you suggest we display the messages to the data team.

kahummer commented 3 years ago

@kelvin-muchiri A simple alert box would do. I was thinking of sentry but then this would be an overkill for such a problem

kelvin-muchiri commented 3 years ago

@kahummer Ok....sure....a simple alert box would do.....But we would also make sure the alert boxes would be caught in the staging site and not make it to the production site?

kahummer commented 3 years ago

Here is a list of recent issues we've been tackling from various clients. I've tried to list the data specific ones to help us understand better what components require schema validations the most

kahummer commented 2 years ago

Considering Gisida is being deprecated generating schema validations for existing layers and validating layers on commit is a better approach than catching the errors on the component. With time we can build more complex schemas that not only support types but what specif objects or strings are expected on different properties on the layer specification.