-
Notifications
You must be signed in to change notification settings - Fork 36
Coding guidelines~Schema management
The schema for the 3D Scenes Configuration JSON document lives under the schemas path of the repository. Once this repository goes public, this can be referenced like a CDN by any JSON document which adheres to this schema.
The schema grouping and versioning uses the following pattern:
/schemas
/ eg: 3DScenesConfiguration
/ eg: 1.0.0
.schema.json eg: 3DScenesConfiguration.schema.json
To create a new schema version, follow the semantic versioning rules and duplicate the schema to a new version folder.
To generate TypeScript types from the schema, use the json-schema-to-typescript node utility script.
The contents of this script can be updated to generate types based on a specific schema version - as well as outputting a versioned .d.ts type file.
To run this script, from the root project folder run: node .\tools\generate-3d-schema-types.js
If you have a question for one of the project maintainers, please post the question here. We'll get back to you as soon as possible!