1
0
Fork 0

feat(rules): add rules to validate json schemas

This commit is contained in:
ssube 2019-11-10 19:11:55 -06:00
parent 84d2ba470b
commit 0b5fe3d5e5
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 27 additions and 0 deletions

27
rules/json-schema.yml Normal file
View File

@ -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