Skip to content

Commit

Permalink
Add schema for the raw JSON (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentsimon authored Mar 21, 2022
1 parent 1c61acd commit ee623e5
Show file tree
Hide file tree
Showing 2 changed files with 510 additions and 0 deletions.
255 changes: 255 additions & 0 deletions cron/format/json.raw.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"binaries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"offset": {
"type": "integer"
},
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
},
"branch-protections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"protection": {
"type": "object",
"properties": {
"allows-deletions": {
"type": "boolean"
},
"allows-force-pushes": {
"type": "boolean"
},
"dismisses-stale-reviews": {
"type": "boolean"
},
"enforces-admin": {
"type": "boolean"
},
"required-linear-history": {
"type": "boolean"
},
"required-reviewer-count": {
"type": "integer"
},
"requires-code-owner-review": {
"type": "boolean"
},
"requires-status-checks": {
"type": "boolean"
},
"requires-updated-branches-to-merge": {
"type": "boolean"
},
"status-checks-contexts": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"required-reviewer-count",
"allows-deletions",
"allows-force-pushes",
"requires-code-owner-review",
"required-linear-history",
"dismisses-stale-reviews",
"enforces-admin",
"requires-status-checks",
"requires-updated-branches-to-merge",
"status-checks-contexts"
]
}
},
"required": [
"protection",
"name"
]
}
},
"database-vulnerabilities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ID": {
"type": "string"
}
},
"required": [
"ID"
]
}
},
"default-branch-commits": {
"type": "array",
"items": {
"type": "object",
"properties": {
"commit-message": {
"type": "string"
},
"committer": {
"type": "object",
"properties": {
"login": {
"type": "string"
}
},
"required": [
"login"
]
},
"merge-request": {
"type": "object",
"properties": {
"author": {
"type": "object",
"properties": {
"login": {
"type": "string"
}
},
"required": [
"login"
]
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"number": {
"type": "integer"
},
"reviews": {
"type": "array",
"items": {
"type": "object",
"properties": {
"reviewer": {
"type": "object",
"properties": {
"login": {
"type": "string"
}
},
"required": [
"login"
]
},
"state": {
"type": "string"
}
},
"required": [
"reviewer",
"state"
]
}
}
},
"required": [
"number",
"labels",
"reviews",
"author"
]
},
"sha": {
"type": "string"
}
},
"required": [
"committer",
"merge-request",
"commit-message",
"sha"
]
}
},
"dependency-update-tools": {
"type": "array",
"items": {
"type": "object",
"properties": {
"desc": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"offset": {
"type": "integer"
},
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"name",
"url",
"desc",
"files"
]
}
},
"security-policies": {
"type": "array",
"items": {
"type": "object",
"properties": {
"offset": {
"type": "integer"
},
"path": {
"type": "string"
}
},
"required": [
"path"
]
}
}
},
"required": [
"database-vulnerabilities",
"binaries",
"security-policies",
"dependency-update-tools",
"branch-protections",
"default-branch-commits"
]
}
Loading

0 comments on commit ee623e5

Please sign in to comment.