Skip to content

Commit

Permalink
Improved error messages for missing "formatVersion" (#481)
Browse files Browse the repository at this point in the history
* Rename Actions

* Improve error message for missing "formatVersion"

* Fix typo in action
  • Loading branch information
schneidermic0 authored Feb 7, 2023
1 parent 2c616f8 commit 86fe2ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/py-validation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate JSON data
name: Validate JSON examples

on:
pull_request:
Expand All @@ -9,7 +9,7 @@ permissions:
jobs:
build:
# Name the Job
name: Validate data against JSON schema
name: Validate JSON examples against their schema

runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion json-validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def match_schema_instance( ):
try:
version = json_data["formatVersion"]
except KeyError:
msg_errors.append(f"::error file={instance},line={1},col={1}::JSON data does not provide a formatVersion")
msg_errors.append(f"::error file={instance},line={1},col={1}::JSON example does not specify the field \"formatVersion\"")
continue
except TypeError:
# in case decoding failed
Expand Down

0 comments on commit 86fe2ff

Please sign in to comment.