scenarioo / scenarioo-format

Specification of the next generation Scenarioo documentation format (for version 3.0 and upwards)
http://www.scenarioo.org
GNU Lesser General Public License v3.0
0 stars 2 forks source link

Formal format specification and automatic validation #5

Open dola opened 8 years ago

dola commented 8 years ago

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.

xeronimus commented 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.

bruderol commented 8 years ago

@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!

bruderol commented 8 years ago

JS will include the json schema format and other libraries, can use it if they like, but do not necessarily have to.

bruderol commented 8 years ago

to be considered for server side refactoring ...

bruderol commented 8 years ago

@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.

dola commented 8 years ago

Will commit them to the format repo once complete.

bruderol commented 8 years ago

thanks! :+1: