Open dola opened 8 years ago
I used this already in scenarioo-js: https://github.com/scenarioo/scenarioo-js/blob/develop/lib/docuWriter/entityValidator.js
The schema files are far from complete... But maybe you can reuse...
Dominic Langenegger notifications@github.com schrieb am Fr., 29. Jan. 2016 10:05:
A formal specification of the format can also be used to perform a format validation when reading the json files. It also is a very precise way to describe the format. A standard for this is JSON Schema as described here: http://json-schema.org/
There do exist libraries for JavaScript, Java and .NET under open licences (MIT / Apache) that could be used to perform a validation.
— Reply to this email directly or view it on GitHub https://github.com/scenarioo/scenarioo-format/issues/5.
@dola :+1: :100: for this solution, I think we all had something similar already in mind.
But also: there was an idea to have a standalone (command line) tool, to validate any output format, without the need of having a running scenarioo server. This standalone tool could do more powerful checks (that you can not do with json schema only), where needed, also concerning the consistency between all the files and the file system structure.
But we should certainly take your proposal into account and use a Json Validator. Thank you for the input!
JS will include the json schema format and other libraries, can use it if they like, but do not necessarily have to.
to be considered for server side refactoring ...
@dola I assigned this to you, because you started this allready in JS-library. you can assign it to me, when the json schemas are considered complete. We should then also commit those to the format repo, shouldnt we? Thank you.
Will commit them to the format repo once complete.
thanks! :+1:
A formal specification of the format can also be used to perform a format validation when reading the json files. It also is a very precise way to describe the format. A standard for this is JSON Schema as described here: http://json-schema.org/
There do exist libraries for JavaScript, Java and .NET under open licences (MIT / Apache) that could be used to perform a validation.