Roadmap in TODO.md. 👈 This is where to contribute if you'd like to help!
ℹ️ https://spacetelescope.github.io/ is the best source I've found for info on authoring JSONSchemas. I recommend looking it over to familiarize yourself with JSONSchema if you've never used them before and keeping it open for reference!
- Clone this repository
npm install
- Work on schemas in
src. Use localhost URLs for references (these will be replaced before publish) - Serve them from localhost using
npm run serve.- You can now point to the local versions of these schemas for testing from a different VSCode window with a test project. Example: http://localhost:8090/loopback-datasources-config.json
- To try them out with a JSON document in vscode, create a document like this:
{ "$schema": "http://localhost:8090/loopback-datasources-config.json", "db": { "name": "db", "connector": "memory" }, "mysql": { "host": "localhost", "url": "", "database": "boston", "name": "mysql", "connector": "mysql", "user": "root" } } - To get VSCode to reload your schema after changing it, add a query string to the end of the
$schemaURL: - Edit schema in
src - in your test project window:
"$schema": "http://localhost:8090/loopback-datasources-config.json?x=1" - Edit schema in
src - in your test project window:
"$schema": "http://localhost:8090/loopback-datasources-config.jsonx=2" - etc.
- run
npm run buildin order to get your changes into thedistdirectory - commit, push, submit PR
Production schemas are served from the dist directory. The build npm script does the following:
- copies files from
srctodist - replaces
http://localhost:8090with the real base url for the schemas. This is currently github but will likely be schema store later.
src & dist directories.