mora icon indicating copy to clipboard operation
mora copied to clipboard

Is there any plan to add api input validation.

Open sapamja opened this issue 8 years ago • 2 comments

I think its a good idea to validate the documents before we insert into the database, Using some kind of configuration includes a schema definition for every resource managed by the API.

sapamja avatar Dec 05 '16 19:12 sapamja

i like this idea. for that, we could use some JSON schema validation package such as https://github.com/xeipuuv/gojsonschema

emicklei avatar Dec 06 '16 08:12 emicklei

Thanks for your response. So, If I would like to implement gojsonschema, where should i do that. I think it should go under documents/handler.go. Please correct me if thats not the right place.

sapamja avatar Dec 08 '16 04:12 sapamja