diff --git a/.github/workflows/check-mod.yml b/.github/workflows/check-mod.yml index 315b718f..26e721de 100644 --- a/.github/workflows/check-mod.yml +++ b/.github/workflows/check-mod.yml @@ -121,10 +121,11 @@ jobs: - name: Validate meta.json Against Schema if: always() && steps.find-changed-mods.outputs.changed_mods_found == 'true' - uses: dsanders11/json-schema-validate-action@v1.2.0 + uses: dsanders11/json-schema-validate-action@v1.4.0 with: schema: "./schema/meta.schema.json" files: ${{ steps.find-changed-mods.outputs.meta_json_files }} + custom-errors: true - name: Validate Download URLs if: always() && steps.find-changed-mods.outputs.changed_mods_found == 'true' diff --git a/schema/meta.schema.json b/schema/meta.schema.json index 9cfbf231..8ac6c4ef 100644 --- a/schema/meta.schema.json +++ b/schema/meta.schema.json @@ -105,7 +105,7 @@ } ] }, - "description": "When 'downloadURL' points to a specific GitHub release tag/asset AND 'automatic-version-check' is true, 'fixed-release-tag-updates' must also be true. This prevents accidental update freezing." + "errorMessage": "When 'downloadURL' points to a specific GitHub release tag/asset AND 'automatic-version-check' is true, 'fixed-release-tag-updates' must also be true. This prevents accidental update freezing." }, { "$comment": "This rule checks the value of 'fixed-release-tag-updates' and guarantees consistency", @@ -125,29 +125,29 @@ "required": [ "version" ], - "description": "When 'fixed-release-tag-updates' is true, the 'version' field must NOT be present as the version is extracted automatically." + "errorMessage": "When 'fixed-release-tag-updates' is true, the 'version' field must NOT be present as the version is extracted automatically." }, "properties": { "automatic-version-check": { "const": true, - "description": "'automatic-version-check' must be true when 'fixed-release-tag-updates' is true." + "errorMessage": "'automatic-version-check' must be true when 'fixed-release-tag-updates' is true." }, "downloadURL": { "pattern": "^https?://github\\.com/[^/]+/[^/]+/releases/(tag/[^/]+|download/[^/]+/.+)$", - "description": "When 'fixed-release-tag-updates' is true, 'downloadURL' must point to a specific GitHub release tag (e.g., '/releases/tag/v1.0.0') or a specific release asset (e.g., '/releases/download/v1.0.0/asset.zip'), NOT a branch head or latest release URL." + "errorMessage": "When 'fixed-release-tag-updates' is true, 'downloadURL' must point to a specific GitHub release tag (e.g., '/releases/tag/v1.0.0') or a specific release asset (e.g., '/releases/download/v1.0.0/asset.zip'), NOT a branch head or latest release URL." } }, "required": [ "automatic-version-check" ], - "description": "When 'fixed-release-tag-updates' is true: 'version' must be absent, 'automatic-version-check' must be true, and 'downloadURL' must point to a specific release tag or asset." + "errorMessage": "When 'fixed-release-tag-updates' is true: 'version' must be absent, 'automatic-version-check' must be true, and 'downloadURL' must point to a specific release tag or asset." }, "else": { "$comment": "Conditions when 'fixed-release-tag-updates' is false or absent", "required": [ "version" ], - "description": "When 'fixed-release-tag-updates' is false or absent, the 'version' field is required." + "errorMessage": "When 'fixed-release-tag-updates' is false or absent, the 'version' field is required." } } ]