-
Notifications
You must be signed in to change notification settings - Fork 123
Description
From a recent scan of GitHub data packages, roughly 67% validate successfully against the current data-package.json schema.
Due to the pass-fail nature of the validation, it's not readily apparent whether a package is wholly out of compliance (e.g. missing name field) or failed for a minor reason (e.g. specified an invalid media type for one of its resources). I propose assigning a severity to each issue, depending on both the language in the spec and the nature of JSON.
My proposal is to rank issues by the language involved (MUST being highest-severity) as well as whether the issue occurs under an optional parent. As an example, a missing top-level name field would be critical severity, while violating a MUST under a SHOULD would be at most medium severity (e.g. an invalid hash on a particular resource).
Here's a quick table to illustrate what I'm describing:
| Severity | Examples |
|---|---|
| Critical | Invalid JSON, missing required field |
| High | Type error on required field, regex error on required field |
| Medium | Type error on top-level optional field that has children (e.g. resources) |
| Low | Type error on optional field, regex error on optional field |
It might also be useful to include a warning level, for when an explicit recommendation given by a SHOULD is disregarded, e.g. omitting a name field on a resource, although many SHOULD directives appear difficult to enforce in an automated manner.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status