← Back to issue list

Swap yaml schema document with json equivalent

View original Github issue

Metadata

Project
snapcraft
Number
#2448
Type
pull request
State
merged
Author
lucyllewy
Labels
—
Created
Updated
Closed

Current evaluation

PR #2448 merged as commit 2a2f798d0 ("schema: convert yaml jsonschema document to a json equivalent"), replacing schema/snapcraft.yaml with schema/snapcraft.json and adjusting validation error formatting.

Resolution: closed resolved

Reason: The pull request was approved and merged into master; commit 2a2f798d0 removed schema/snapcraft.yaml and added the equivalent schema/snapcraft.json, with validation message formatting updated per reviewer feedback (sergiusens asked to use echo.wrap).

Evaluated by: mr-cal-bot

No scores available.

Issue body

Direct conversion of schema/snapcraft.yaml to json saved to schema/snapcraft.json. Signed-off-by: Daniel Llewellyn <daniel@bowlhat.net> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [ ] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? Unit tests fail on the formatting of messages regarding yaml validation -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #2448 merged as commit 2a2f798d0 ("schema: convert yaml jsonschema document to a json equivalent"), replacing schema/snapcraft.yaml with schema/snapcraft.json and adjusting validation error formatting.
stealth/space-bunny-alpha — closed resolved Merged #2448 in commit 2a2f798d0, replacing schema/snapcraft.yaml with an equivalent JSON schema and updating validation-message formatting.
qwen/qwen3.6-35b-a3b — — Merged conversion of the snapcraft YAML schema to JSON. Reviewers requested formatting adjustments for validation error messages, specifically removing line breaks and using echo.wrap. Approved, passed CI, and merged to master.
qwen3.6-35b-a3b-mtp-q6 — — Merged conversion of the snapcraft schema from YAML to JSON. Feedback led to removing embedded line breaks and updating error printing to echo.wrap, resolving unit test failures. The change increased code coverage by 0.01%.

Update history

No update history recorded yet.

Related work

  • Related To: snapcore/snapcraft#2443 (confidence 30%)

    Preceding schema commit (8942bd69e) converting the yaml schema immediately before this change.

Related issues

Issue Project State Summary Similarity
#2446 Update schema/snapcraft.yaml snapcraft closed PR #2446 edited schema/snapcraft.yaml to aid yaml-to-json converters but was closed unmerged in favour of #2448, which replaced the YAML schema with snapcraft.json (commit 2a2f798d0).
81%
#1815062 Export the schema to json to allow for easier IDE linting snapcraft (launchpad) closed Exported the Snapcraft schema as JSON for IDE and jsonschema linting via canonical/snapcraft#2448, merged in commit 2a2f798d0.
72%
#1622 schema: sync patterns with snapd snapcraft merged Merged PR #1622 in commit 066d6e757, aligning snap and hook name schema patterns with snapd and improving jsonschema error handling; fixes LP #1693798.
72%
#419 Properly validate the schema snapcraft merged Merged PR #419 in commit 116352b7d, refactoring schema validation to remove duplicated logic from snapcraft.yaml and fixing autopackage tests.
70%