@divvydiary/divvydiary-json-schemas 0.7.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@divvydiary/divvydiary-json-schemas",
3
- "version": "0.7.1",
3
+ "version": "0.8.0",
4
4
  "description": "JSON Schemas for DivvyDiary.com",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "$id": "https://divvydiary.com/schemas/defs.json",
3
3
  "title": "Definitions",
4
- "definitions": {
4
+ "type": "object",
5
+ "properties": {
5
6
  "currency": {
6
7
  "type": "string",
7
8
  "enum": [
@@ -39,19 +39,19 @@
39
39
  "minimum": 0
40
40
  },
41
41
  "taxRate": {
42
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/taxRate"
42
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
43
43
  },
44
44
  "isin": {
45
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/isin"
45
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/isin"
46
46
  },
47
47
  "wkn": {
48
48
  "oneOf": [
49
- { "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/wkn" },
49
+ { "$ref": "https://divvydiary.com/schemas/defs.json#/properties/wkn" },
50
50
  { "type": "null" }
51
51
  ]
52
52
  },
53
53
  "currency": {
54
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/currency"
54
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
55
55
  }
56
56
  }
57
57
  }
@@ -13,37 +13,37 @@
13
13
  "maxLength": 6
14
14
  },
15
15
  "isin": {
16
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/isin"
16
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/isin"
17
17
  },
18
18
  "wkn": {
19
19
  "oneOf": [
20
- { "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/wkn" },
20
+ { "$ref": "https://divvydiary.com/schemas/defs.json#/properties/wkn" },
21
21
  { "type": "null" }
22
22
  ]
23
23
  },
24
24
  "exchange": {
25
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/exchange"
25
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/exchange"
26
26
  },
27
27
  "dividendFrequency": {
28
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/dividendFrequency"
28
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/dividendFrequency"
29
29
  },
30
30
  "taxRate": {
31
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/taxRate"
31
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
32
32
  },
33
33
  "payoutRatio": {
34
- "type": ["number", "null"],
34
+ "type": "number",
35
35
  "minimum": 0,
36
36
  "description": "Payout Ratio *aristocrats only*",
37
37
  "nullable": true
38
38
  },
39
39
  "dividendRate": {
40
- "type": ["number", "null"],
40
+ "type": "number",
41
41
  "minimum": 0,
42
42
  "description": "Forward Annual Payout (FWD) *aristocrats only*",
43
43
  "nullable": true
44
44
  },
45
45
  "dividendYield": {
46
- "type": ["number", "null"],
46
+ "type": "number",
47
47
  "minimum": 0,
48
48
  "description": "Forward Dividend Yield (FWD) *aristocrats only*",
49
49
  "nullable": true
@@ -52,16 +52,16 @@
52
52
  "type": "object",
53
53
  "description": "Dividend Growth Rate (CAGR) *aristocrats only*",
54
54
  "properties": {
55
- "1Y": { "type": ["number", "null"] },
56
- "2Y": { "type": ["number", "null"] },
57
- "3Y": { "type": ["number", "null"] },
58
- "4Y": { "type": ["number", "null"] },
59
- "5Y": { "type": ["number", "null"] },
60
- "6Y": { "type": ["number", "null"] },
61
- "7Y": { "type": ["number", "null"] },
62
- "8Y": { "type": ["number", "null"] },
63
- "9Y": { "type": ["number", "null"] },
64
- "10Y": { "type": ["number", "null"] }
55
+ "1Y": { "type": "number", "nullable": true },
56
+ "2Y": { "type": "number", "nullable": true },
57
+ "3Y": { "type": "number", "nullable": true },
58
+ "4Y": { "type": "number", "nullable": true },
59
+ "5Y": { "type": "number", "nullable": true },
60
+ "6Y": { "type": "number", "nullable": true },
61
+ "7Y": { "type": "number", "nullable": true },
62
+ "8Y": { "type": "number", "nullable": true },
63
+ "9Y": { "type": "number", "nullable": true },
64
+ "10Y": { "type": "number", "nullable": true }
65
65
  }
66
66
  }
67
67
  }
@@ -19,7 +19,7 @@
19
19
  "currency": {
20
20
  "oneOf": [
21
21
  {
22
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/currency"
22
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/currency"
23
23
  },
24
24
  { "type": "null" }
25
25
  ]
@@ -27,7 +27,7 @@
27
27
  "apiKey": {
28
28
  "oneOf": [
29
29
  {
30
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/uuid"
30
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/uuid"
31
31
  },
32
32
  { "type": "null" }
33
33
  ]
@@ -35,7 +35,7 @@
35
35
  "calendarToken": {
36
36
  "oneOf": [
37
37
  {
38
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/uuid"
38
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/uuid"
39
39
  },
40
40
  { "type": "null" }
41
41
  ]
@@ -47,13 +47,14 @@
47
47
  "shared": { "type": "boolean" },
48
48
  "supporter": { "type": "boolean" },
49
49
  "stripeId": {
50
- "type": ["string", "null"],
51
- "maxLength": 255
50
+ "type": "string",
51
+ "maxLength": 255,
52
+ "nullable": true
52
53
  },
53
54
  "plan": { "type": "string", "enum": ["free", "monthly", "yearly"] },
54
55
  "taxes": { "type": "boolean" },
55
56
  "defaultTaxRate": {
56
- "$ref": "https://divvydiary.com/schemas/defs.json#/definitions/taxRate"
57
+ "$ref": "https://divvydiary.com/schemas/defs.json#/properties/taxRate"
57
58
  },
58
59
  "taxesType": { "type": "string", "enum": ["homo", "hetero"] }
59
60
  }