Feat sharing#2
Conversation
…README and v1.0 references
- Removed the validation job from the main deployment workflow and created a new workflow for validating pull requests. - Updated the deployment workflow to directly deploy to GitHub Pages without the validation step. - Enhanced the schema documentation build process to include examples for all schema versions. - Updated README to reflect the availability of examples for respective JSON schema versions. - Added new audio and image assets for examples in both v1.0 and v1.1 schemas. - Created new data.json files for examples in v1.0 and v1.1 schemas with structured content.
There was a problem hiding this comment.
Pull request overview
Introduces schema versioning and a new v1.1 schema to support sharing, along with versioned example datasets and updated GitHub Pages/CI workflows to publish and validate the versioned format.
Changes:
- Add JSON Schema v1.1 with new optional
sharefield and publish both v1.0/v1.1 schemas via GitHub Pages. - Add versioned examples for v1.0 and v1.1 (animals, leon), including updated links in the README.
- Add PR-time JSON schema validation workflow and update Pages workflow to generate per-version schema docs.
Reviewed changes
Copilot reviewed 7 out of 99 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| schema/v1.1/schema.json | Adds v1.1 schema including new share field. |
| schema/v1.0/schema.json | Updates schema metadata ($id, title, description) to be explicitly versioned. |
| examples/v1.1/leon/data.json | Adds v1.1 leon example including share. |
| examples/v1.1/animals/data.json | Adds v1.1 animals example including share. |
| examples/v1.0/leon/data.json | Adds v1.0 leon example. |
| examples/v1.0/animals/data.json | Adds v1.0 animals example. |
| README.md | Documents schema versioning and adds versioned example/schema links. |
| .github/workflows/pr.yml | Adds PR validation for example JSON files against the schema. |
| .github/workflows/pages.yml | Updates Pages build to publish per-version schemas/docs and latest-at-root. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| | Version | Description | JSON schema | | ||
| | --- | --- | --- | | ||
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addtion the optional attributes `pins` and `servers` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | |
There was a problem hiding this comment.
Typo in the version description: "In addtion" should be "In addition".
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addtion the optional attributes `pins` and `servers` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | | |
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addition the optional attributes `pins` and `servers` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | |
|
|
||
| | Version | Description | JSON schema | | ||
| | --- | --- | --- | | ||
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addtion the optional attributes `pins` and `servers` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | |
There was a problem hiding this comment.
README says the optional attribute is servers, but the schemas (v1.0/v1.1) define the property as server (singular). Please align the documentation with the actual field name to avoid consumers using the wrong key.
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addtion the optional attributes `pins` and `servers` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | | |
| | v1.0 | Defines the initial schema with the core data attributes `stations`, `tours`, `assets`, `languages`, `texts` and the `checksum`. In addtion the optional attributes `pins` and `server` are defined. | https://smartcompanion-app.github.io/data-format/v1.0/schema.json | |
| run: pip install check-jsonschema | ||
|
|
||
| - name: Validate examples | ||
| run: check-jsonschema --schemafile schema/v1.1/schema.json examples/v1.1/*/data.json No newline at end of file |
There was a problem hiding this comment.
The PR adds/maintains both v1.0 and v1.1 examples, but the PR workflow only validates v1.1 (examples/v1.1/*/data.json). Add validation for v1.0 as well (and/or loop over all schema/v*/schema.json + examples/v*/**/data.json) so older version examples don’t silently drift out of spec.
| run: check-jsonschema --schemafile schema/v1.1/schema.json examples/v1.1/*/data.json | |
| run: | | |
| set -euo pipefail | |
| for schema in schema/v*/schema.json; do | |
| version="$(basename "$(dirname "$schema")")" | |
| examples_dir="examples/$version" | |
| if [ -d "$examples_dir" ]; then | |
| find "$examples_dir" -name data.json -print0 | xargs -0 check-jsonschema --schemafile "$schema" | |
| fi | |
| done |
No description provided.