Extract schema from document and improve validate script#2
Draft
cocor-au-lait wants to merge 5 commits intoLive2D:masterfrom
Draft
Extract schema from document and improve validate script#2cocor-au-lait wants to merge 5 commits intoLive2D:masterfrom
cocor-au-lait wants to merge 5 commits intoLive2D:masterfrom
Conversation
Author
|
I refine to use Asciidoctor for document format. This allows to embed source code in docs, but unfortunately GitHub doesn't seem to support this feature yet ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Thanks to the development team.
For more general purpose, I've changed some project structure and Python script.
In additional, I've fixed some typo and schema definition errors.
Extract json from document
I've extract schema json and example json from each document.
Schema json files are located in
/Schemasdirectory.By making it standalone json file, Developers can fetch the latest json schema from the master branch URL.
Example json files are located in
/Examplesdirectory.By using Python validation script, it can check that the json example is implemented correctly.
Each document files includes links to each json files, but I'm sorry anyone who get frustrated by the amount of moving pages.
Improvements to Python validate script
Since Python 2.x is EOL, I've implemented simply by using Python 3.x powerful features.
It can specify target path from the argument and automatically detect requiered extensions from files in
/Schemas.I hope this will save you a lot of maintenance 😃
In additional that, I imitated a colorful test log I've seen somewhere.
Fixing schema definition errors
cdi3.schema.jsonwas broken because of missingpropertieskey, so I've fixed it correctly. (I thought it probably gotpropertieskey anddefinitionskey wrong.)By the way, it's hard to write the json schema by hand typing 😞 Is there a good tool for more useful.
Testing
I've checked the varidation script and example json files was implemented correctly.
If the json implementation is not correct, script returns an error with messages like following.
Others
In this repository, there is no license statements about license, and no copyright comment in
checkscript.py.Other repository has it, so I think it was better to describe.
Best regards.