Skip to content

Commit

Permalink
Merge pull request #15 from LedgerHQ/conf/add-allowlist-json-schema
Browse files Browse the repository at this point in the history
conf(allowlist): add json-schema
  • Loading branch information
wahtique authored Oct 20, 2022
2 parents da325d6 + 123e941 commit fe7ba64
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions allowlist.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./allowlist.schema.json",
"allowlist": {
"ethereum": [
{
Expand Down
81 changes: 81 additions & 0 deletions allowlist.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/root",
"definitions": {
"root": {
"type": "object",
"additionalProperties": false,
"properties": {
"allowlist": {
"$ref": "#/definitions/Allowlist"
},
"$schema": {
"type": "string"
}
},
"required": [
"allowlist",
"$schema"
],
"title": "root"
},
"Allowlist": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/Dapp"
}
},
"title": "Allowlist"
},
"Dapp": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"domain": {
"type": "string"
},
"token": {
"anyOf": [
{
"type": "null"
},
{
"type": "string"
}
]
},
"contracts": {
"type": "array",
"items": {
"$ref": "#/definitions/Contract"
}
}
},
"required": [
"contracts",
"domain",
"name",
"token"
],
"title": "Dapp"
},
"Contract": {
"type": "object",
"additionalProperties": false,
"properties": {
"address": {
"type": "string"
}
},
"required": [
"address"
],
"title": "Contract"
}
}
}

0 comments on commit fe7ba64

Please sign in to comment.