-
-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Get Familiar] Add schema validation for template configuration #43
Comments
Hi @Udayraj123 , should the schema be created exactly for the template file mentioned here: Template File ? |
That's correct. The same schema can also be found for all template.json files in samples folder |
Would it be possible to get an example of an incorrect template file, I did write some code for the validation schema and error handling, but I'm not sure about the constraints to be put in my schema. Also, when I tried setting the dimensions in the sample template to 3, I expected an error but the code seemed to run fine. So, it would be helpful to know the expected constraints. |
You can create incorrect template.json files by removing some of the mandatory keys, or changing their camelCase to TitleCase for keys(in which case validation error should mention that). |
Have generated a draft PR, do let me know if this is what you were expecting. |
@SpyzzVVarun discussed on discord. Let me know once all changes done.. |
Merged #60 |
extended in #65 |
Right now, OMRChecker does not handle invalid template.json files. It simply tries to process the file and throws an errors.
We want to extend that an do a json schema validation for the file.
Steps:
Resources:
Note: this issue is marked with the
hacktoberfest
label. Follow#hacktoberfest-discussions
on Discord for further details .The text was updated successfully, but these errors were encountered: