Aalto-LeTech / JAAL

A data format for recording answers to JSAV exercises
0 stars 1 forks source link

Schema bundling and testing #21

Open atilante opened 2 years ago

atilante commented 2 years ago

We should be able to bundle the JAAL JSON schema into one .json file, because that is more compact for production use. (less files -> less HTTP requests -> decreased exercise loading time in web browser)

Therefore:

If that works, you can continue with https://github.com/Aalto-LeTech/jsav-exercise-recorder/issues/14 .

Meratyn commented 2 years ago

spec/bundle.js does not work anymore.

The resulting bundle errors out with resolving references internally.

Following https://github.com/APIDevTools/json-schema-ref-parser/tree/main/docs#circular-refs to use the bundle method over dereference causes error: can't resolve reference #/properties/definitions/properties/styles/items/definitions/hexcolor from id https://jaal.fi/schemas/style.json. When trying to resolve this by first dereferencing the style.json file as they are internal references, it causes a similar error for the bundled version: error: can't resolve reference #/properties/animation/items from id https://jaal.fi/schemas/definitions.json.