feat(rules): add rules to validate json schemas
This commit is contained in:
parent
84d2ba470b
commit
0b5fe3d5e5
|
@ -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
|
Loading…
Reference in New Issue