Skip to content

Commit

Permalink
feat(rules): add rules to validate json schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 11, 2019
1 parent 84d2ba4 commit 0b5fe3d
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions rules/json-schema.yml
@@ -0,0 +1,27 @@
name: json-schema
rules:
- name: json-schema-root
desc: root must be a json schema
level: info
tags:
- json-schema
- important

check:
$ref: "http://json-schema.org/draft-07/schema#"

- name: json-schema-id
desc: schema must have an id
level: info
tags:
- json-schema
- important

check:
type: object
required: [$id, $schema]
properties:
$id:
type: string
$schema:
type: string

0 comments on commit 0b5fe3d

Please sign in to comment.