Skip to content

Feat(json validation) - #16

Open
revilowaldow wants to merge 6 commits into
5etools-mirror-3:mainfrom
revilowaldow:feat(json-validation)
Open

revilowaldow wants to merge 6 commits into
5etools-mirror-3:mainfrom
revilowaldow:feat(json-validation)

Conversation

@revilowaldow

@revilowaldow revilowaldow commented Mar 13, 2025

Copy link
Copy Markdown

This proof of concept feature adds live validation of the json schema within the renderer demo.
It further adds autocomplete suggestions similar to those available in VSCode.

image
image

It adds the new ace-linters lib and relies upon the language_tools extension for ace.
https://github.com/mkslanc/ace-linters


Things to consider:

@revilowaldow
revilowaldow marked this pull request as ready for review March 13, 2025 20:27
@TheGiddyLimit

Copy link
Copy Markdown
Collaborator

nifty stuff; any reason not to use the site-fast schema instead of site?

@revilowaldow

Copy link
Copy Markdown
Author

nifty stuff; any reason not to use the site-fast schema instead of site?

site-fast would IIRC only not bother validating adventure/book text.
As the renderer demo is just pure entries it wouldn't make any difference.
Note the schema points directly at entry.json rather than renderdemo.json as we're validating the contents of the data array rather than the file containing the data array

image

@TheGiddyLimit

Copy link
Copy Markdown
Collaborator

ah right enough, ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants