Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavomauricio authored Mar 10, 2024
2 parents 7b270fb + 8c18906 commit 848815f
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/validate-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: json-yaml-validate
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

permissions:
contents: read
pull-requests: write # enable write permissions for pull request comments

jobs:
json-yaml-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/[email protected]
with:
base_dir: ./tokenLists # base directory to search for files
json_schema: schemas/assetlist.schema.json # validate JSON files against the schema
comment: "true" # enable comment mode
43 changes: 43 additions & 0 deletions schemas/assetlist.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"type": "array",
"items": {
"$ref": "#/$defs/asset"
},
"minItems": 1,
"$defs": {
"asset": {
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "The protocol name used for displaying purposes only"
},
"symbol": {
"type": "string",
"description": "The symbol of an asset. eg: ASTRO"
},
"token": {
"type": "string",
"description": "The token address on the original chain"
},
"icon": {
"type": "string"
},
"decimals": {
"type": "integer"
},
"coingeckoId": {
"type": "string"
},
"originDenom": {
"type": "string"
},
"originChainId": {
"type": "string"
}
},
"required": ["protocol", "symbol", "token"],
"additionalProperties": false
}
}
}

0 comments on commit 848815f

Please sign in to comment.