aboutsummaryrefslogtreecommitdiffstats
path: root/src/schemas/token_schema.ts
diff options
context:
space:
mode:
authorLeonid <logvinov.leon@gmail.com>2017-06-10 02:29:08 +0800
committerGitHub <noreply@github.com>2017-06-10 02:29:08 +0800
commit1460966d8f03e5ec0012b21d4c4614c4c3ec44bc (patch)
treeed24d8f87f57b90380d8167b35c5019005a94aba /src/schemas/token_schema.ts
parent478125f3d4feccd3b8396773888d65798af8287f (diff)
parentaefa147ba0e36f7ec302a5f5b6f496cabf784599 (diff)
downloaddexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar.gz
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar.bz2
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar.lz
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar.xz
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.tar.zst
dexon-sol-tools-1460966d8f03e5ec0012b21d4c4614c4c3ec44bc.zip
Merge pull request #54 from 0xProject/schema-tests
Schema tests
Diffstat (limited to 'src/schemas/token_schema.ts')
-rw-r--r--src/schemas/token_schema.ts14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/schemas/token_schema.ts b/src/schemas/token_schema.ts
index 01702af68..1236e07c1 100644
--- a/src/schemas/token_schema.ts
+++ b/src/schemas/token_schema.ts
@@ -4,8 +4,18 @@ export const tokenSchema = {
name: {type: 'string'},
symbol: {type: 'string'},
decimals: {type: 'number'},
- address: {type: 'string'},
- url: {type: 'string'},
+ address: {$ref: '/addressSchema'},
+ url: {
+ oneOf: [
+ {
+ type: 'string',
+ format: 'uri',
+ },
+ {
+ enum: [''],
+ },
+ ],
+ },
},
required: ['name', 'symbol', 'decimals', 'address', 'url'],
type: 'object',