-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.schema.json
93 lines (93 loc) · 3.13 KB
/
options.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
"$id": "https://example.com/address.schema.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"descripton": "Options for truffle-object-mapper",
"title": "Options",
"type": "object",
"additionalProperties": true,
"properties": {
"networkName": {
"description": "Network name corresponding to truffle config network name. Corresponds to truffle 'network' parameter",
"type": "string"
},
"workingDirectory": {
"description": "Base directory to search for truffle config and contracts",
"type": "string"
},
"types": {
"description": "Hash of data type and how retrieved values of this type should be converted. Uses ABI definition to convert all properties of the specified type.",
"type": "object",
"additionalProperties": true
},
"mapping": {
"description": "Hash of source:destination mapping; see: https://github.com/wankdanker/node-object-mapper",
"type": "object",
"additionalProperties": true,
"properties": {},
"patternProperties": {
".*": {
"$ref": "#/definitions/PropertyMappingItem"
}
}
},
"provider": {
"description": "A pre-configured Web3 provider",
"type": "object",
"properties": {},
"additionalProperties": true
},
"contracts": {
"oneOf": [{
"description": "A glob pattern to where contract ABI files are stored. Defaults to: '[workingDirectory]/build/contracts/*.json'",
"type": "string"
}, {
"description": "An array of glob patterns pointing to where contract ABI files are stored",
"type": "array",
"items": {
"description": "A glob pattern to where contract ABI files are stored. Defaults to: '[workingDirectory]/build/contracts/*.json'",
"type": "string"
}
}, {
"description": "A hash of contract name and the pre-loaded ABI. Use if you don't need automatic contract detection and loading",
"type": "object",
"additionalProperties": true
}]
}
},
"definitions": {
"PropertyMappingItem": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"description": "List of outputs within destination object",
"type": "array",
"items": {
"oneOf": [{
"description": "Output key to map value onto within destination object",
"type": "string"
}, {
"$ref": "#/definitions/PropertyMappingObject"
}]
}
}, {
"$ref": "#/definitions/PropertyMappingObject"
}]
},
"PropertyMappingObject": {
"type": "object",
"additionalProperties": true,
"properties": {
"key": {
"description": "Output key to map value onto within destination object",
"type": "string"
},
"transform": {
"description": "Function to transform the output value; see also: https://github.com/wankdanker/node-object-mapper",
"additionalProperties": true
}
},
"required": ["key"]
}
}
}