Skip to content

Commit

Permalink
update json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
chandan-reddy-k committed Sep 13, 2020
1 parent 75bfd49 commit 1e495f3
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 63 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
schedule:
- cron: "0 0 11,23 * * *"
jobs:
curl:
runs-on: ubuntu-latest
steps:
- name: curl
uses: wei/curl@v1
with:
args: -X POST ${{secrets.VERCEL_DEPLOY_HOOK}}
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Validate JSON
on:
pull_request:
paths:
- 'contributors.json'
- 'contributors/**'

jobs:
schema-check:
Expand All @@ -19,4 +19,4 @@ jobs:
run: npm install -g ajv-cli
- name: Run schema check
run:
ajv validate -s schema.json -d contributors.json --all-errors --error-data-path=property --verbose=true
ajv validate -s schema.json -d "contributors/*.json" --all-errors --error-data-path=property --verbose=true
105 changes: 44 additions & 61 deletions schema.json
Original file line number Diff line number Diff line change
@@ -1,72 +1,55 @@
{
"definitions": {},
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "HacktoberFest",
"$id": "Hacktoberfest",
"title": "Root",
"type": "object",
"required": [
"contributors"
"github-username",
"favourite-emoji",
"favourite-music",
"favourite-color"
],
"properties": {
"contributors": {
"$id": "#root/contributors",
"title": "Contributors",
"type": "array",
"default": [],
"items":{
"$id": "#root/contributors/items",
"title": "Items",
"type": "object",
"required": [
"github-username",
"favourite-emoji",
"favourite-music",
"favourite-color"
],
"properties": {
"github-username": {
"$id": "#root/contributors/items/github-username",
"title": "Github-username",
"type": "string",
"default": "",
"examples": [
"chandan-reddy-k"
],
"pattern": "^\\S*$"
},
"favourite-emoji": {
"$id": "#root/contributors/items/favourite-emoji",
"title": "Favourite-emoji",
"type": "string",
"default": "",
"examples": [
"🚀"
],
"pattern": "^.*$"
},
"favourite-music": {
"$id": "#root/contributors/items/favourite-music",
"title": "Favourite-music",
"type": "string",
"default": "",
"examples": [
"https://soundcloud.com/nocopyrightsounds/cartoon-howling-ft-asena-ncs-release"
],
"pattern": "^https:\/\/soundcloud.com?"
},
"favourite-color": {
"$id": "#root/contributors/items/favourite-color",
"title": "Favourite-color",
"type": "string",
"default": "",
"examples": [
"#fff44f"
],
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
}
}

"github-username": {
"$id": "#root/github-username",
"title": "Github-username",
"type": "string",
"default": "",
"examples": [
"chandan-reddy-k"
],
"pattern": "^\\S*$"
},
"favourite-emoji": {
"$id": "#root/favourite-emoji",
"title": "Favourite-emoji",
"type": "string",
"default": "",
"examples": [
"🚀"
],
"pattern": "^.*$"
},
"favourite-music": {
"$id": "#root/favourite-music",
"title": "Favourite-music",
"type": "string",
"default": "",
"examples": [
"https://soundcloud.com/nocopyrightsounds/cartoon-howling-ft-asena-ncs-release"
],
"pattern": "^https:\/\/soundcloud.com?"
},
"favourite-color": {
"$id": "#root/favourite-color",
"title": "Favourite-color",
"type": "string",
"default": "",
"examples": [
"#fff44f"
],
"pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
}
}
}
5 changes: 5 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"github": {
"enabled": false
}
}

0 comments on commit 1e495f3

Please sign in to comment.