Skip to content

Feat(json validation)#16

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

Feat(json validation)#16
revilowaldow wants to merge 6 commits into5etools-mirror-3:mainfrom
revilowaldow:feat(json-validation)

Conversation

@revilowaldow
Copy link

@revilowaldow revilowaldow commented Mar 13, 2025

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
Collaborator

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

@revilowaldow
Copy link
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
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