-
Notifications
You must be signed in to change notification settings - Fork 358
feat: add JSON schema validation #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ritesh-pandey
wants to merge
39
commits into
swapagarwal:master
Choose a base branch
from
ritesh-pandey:JSON-schema-validation-745
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
86da2d9
Added JSON schema validation
ritesh-pandey d50f4e6
Moved ajv from dependency to devDependency
ritesh-pandey 23f6888
Added Chai plug-in for running tests
ritesh-pandey 2b4426c
Removed chai plug-in for schema validation
ritesh-pandey 7ae574e
feat: expose dataset on website (#795)
ARKEOLOGIST 12f69af
fix(swag): update broken image links (#835)
aslafy-z 4a247fe
chore(deps): bump path-parse from 1.0.6 to 1.0.7 (#838)
dependabot[bot] 5d2a40a
fix(swag): set Img Bot opportunity as expired (#837)
Nikhil27b e333076
fix(swag): update openebs image (#844)
aslafy-z 8c3556f
feat: replace renovate with dependabot (#841)
aslafy-z 7651c9c
chore(deps): bump actions/setup-node from 1 to 2.4.0 (#845)
dependabot[bot] 9f7f3ae
chore(deps): bump actions/cache from 1 to 2.1.6 (#846)
dependabot[bot] 4db726e
chore(deps-dev): bump postcss from 8.1.6 to 8.3.6 (#847)
dependabot[bot] f48d027
chore(deps): bump browserslist from 4.14.5 to 4.16.8 (#848)
dependabot[bot] 67862a8
chore(deps): bump hosted-git-info from 2.7.1 to 2.8.9 (#820)
dependabot[bot] 1e1e743
chore(deps): bump lodash from 4.17.19 to 4.17.21 (#819)
dependabot[bot] 7f0773e
chore(deps): bump ini from 1.3.5 to 1.3.8 (#849)
dependabot[bot] 6308d9f
chore(deps): bump y18n from 3.2.1 to 3.2.2 (#814)
dependabot[bot] e8e7948
chore(deps): bump pug-code-gen from 2.0.1 to 2.0.3 (#813)
dependabot[bot] eef510e
chore(deps-dev): bump chai from 4.2.0 to 4.3.4 (#851)
dependabot[bot] c860f07
chore(deps-dev): bump mocha from 8.2.1 to 9.1.0 (#850)
dependabot[bot] e5855b0
chore(deps-dev): bump sharp from 0.26.2 to 0.29.0 (#852)
dependabot[bot] dbac040
chore(deps-dev): bump @babel/core from 7.12.3 to 7.15.0 (#853)
dependabot[bot] f0b2f31
fix: update tag selector background color (#854)
aslafy-z c41d68c
feat: mark opportunities as done (#438)
amhislop e281582
Update test/functional/data.spec.js
aslafy-z 2f31701
Update test/functional/data.spec.js
aslafy-z 344b453
Update schema.json
aslafy-z d2f6503
Update data.spec.js
aslafy-z d117814
Added JSON schema validation
ritesh-pandey 341af8a
Moved ajv from dependency to devDependency
ritesh-pandey d3c5c1e
Added Chai plug-in for running tests
ritesh-pandey db1c678
Removed chai plug-in for schema validation
ritesh-pandey 6ff5f8c
Update test/functional/data.spec.js
aslafy-z 7075125
Update test/functional/data.spec.js
aslafy-z 4d2fcf5
Update schema.json
aslafy-z 4695e5f
Update data.spec.js
aslafy-z 4adfcf0
Merge branch 'JSON-schema-validation-745' of github.com:ritesh-pandey…
ritesh-pandey 6b93da5
Updated package-lock.json
ritesh-pandey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,108 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema", | ||
| "$id": "http://devswag.io/schema.json", | ||
| "type": "array", | ||
| "title": "The root schema", | ||
| "description": "The root schema comprises the entire JSON document.", | ||
| "default": [], | ||
| "examples": [], | ||
| "additionalItems": true, | ||
| "items": { | ||
| "$id": "#/items", | ||
| "anyOf": [ | ||
| { | ||
| "$id": "#/items/anyOf/0", | ||
| "type": "object", | ||
| "title": "The first anyOf schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": {}, | ||
| "examples": [], | ||
| "required": [ | ||
| "name", | ||
| "difficulty", | ||
| "description", | ||
| "reference", | ||
| "image", | ||
| "dateAdded", | ||
| "tags" | ||
| ], | ||
| "properties": { | ||
| "name": { | ||
| "$id": "#/items/anyOf/0/properties/name", | ||
| "type": "string", | ||
| "title": "The name schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [] | ||
| }, | ||
| "difficulty": { | ||
| "$id": "#/items/anyOf/0/properties/difficulty", | ||
| "type": "string", | ||
| "title": "The difficulty schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [], | ||
| "pattern": "easy|medium|hard" | ||
| }, | ||
| "description": { | ||
| "$id": "#/items/anyOf/0/properties/description", | ||
| "type": "string", | ||
| "title": "The description schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [] | ||
| }, | ||
| "reference": { | ||
| "$id": "#/items/anyOf/0/properties/reference", | ||
| "type": "string", | ||
| "title": "The reference schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [] | ||
| }, | ||
| "image": { | ||
| "$id": "#/items/anyOf/0/properties/image", | ||
| "type": "string", | ||
| "title": "The image schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [], | ||
| "format": "uri" | ||
| }, | ||
| "dateAdded": { | ||
| "$id": "#/items/anyOf/0/properties/dateAdded", | ||
| "type": "string", | ||
| "title": "The dateAdded schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [], | ||
| "format": "date-time" | ||
| }, | ||
| "tags": { | ||
| "$id": "#/items/anyOf/0/properties/tags", | ||
| "type": "array", | ||
| "title": "The tags schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": [], | ||
| "examples": [], | ||
| "additionalItems": true, | ||
| "minItems": 1, | ||
| "items": { | ||
| "$id": "#/items/anyOf/0/properties/tags/items", | ||
| "anyOf": [ | ||
| { | ||
| "$id": "#/items/anyOf/0/properties/tags/items/anyOf/0", | ||
| "type": "string", | ||
| "title": "The first anyOf schema", | ||
| "description": "An explanation about the purpose of this instance.", | ||
| "default": "", | ||
| "examples": [] | ||
aslafy-z marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.