RobokopU24 / qgraph

ROBOKOP UI
1 stars 0 forks source link

JSON Validator for uploaded questions #56

Open alongreyber opened 4 years ago

alongreyber commented 4 years ago

Might be worth looking into using a JSON schema validator on uploaded questions and messages to ensure they match the Reasoner Standard API. This would reduce the amount of validation that we need to maintain manually as well as hopefully giving us the ability to provide better error messages back to users.

https://github.com/ajv-validator/ajv

maximusunc commented 4 years ago

I think this is a good idea, and something I somewhat implemented here: https://github.com/ranking-agent/gamma-viewer/blob/master/js/src/App.jsx#L13. We would want a static yaml schema file as we don't want a remote one to change out from under us.