Skip to content

Commit

Permalink
fix(quoteSummary): more optionality, enum types, to fix tests (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Feb 17, 2021
1 parent 93dafc6 commit bc47bdf
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 133 deletions.
126 changes: 58 additions & 68 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
"yahooFinanceType": "number"
},
"minorityInterest": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"netReceivables": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -702,10 +702,6 @@
],
"type": "object"
},
"DiscontinuedOperations": {
"additionalProperties": false,
"type": "object"
},
"EarningsChart": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -761,22 +757,22 @@
"additionalProperties": false,
"properties": {
"avg": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"growth": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"high": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"low": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"numberOfAnalysts": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"yearAgoEps": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand Down Expand Up @@ -812,13 +808,13 @@
"additionalProperties": false,
"properties": {
"epsActual": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"epsDifference": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"epsEstimate": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"maxAge": {
"yahooFinanceType": "number"
Expand All @@ -827,10 +823,10 @@
"type": "string"
},
"quarter": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"surprisePercent": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand Down Expand Up @@ -886,7 +882,7 @@
"$ref": "#/definitions/EpsTrend"
},
"growth": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"maxAge": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -914,16 +910,16 @@
"additionalProperties": false,
"properties": {
"downLast30days": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"downLast90days": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"upLast30days": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"upLast7days": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand All @@ -938,19 +934,19 @@
"additionalProperties": false,
"properties": {
"30daysAgo": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"60daysAgo": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"7daysAgo": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"90daysAgo": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"current": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand Down Expand Up @@ -1175,17 +1171,10 @@
"required": [
"maxAge",
"currentPrice",
"targetHighPrice",
"targetLowPrice",
"targetMeanPrice",
"targetMedianPrice",
"recommendationKey",
"numberOfAnalystOpinions",
"quickRatio",
"currentRatio",
"debtToEquity",
"returnOnAssets",
"returnOnEquity",
"grossProfits",
"revenueGrowth",
"grossMargins",
Expand Down Expand Up @@ -1510,10 +1499,16 @@
"type": "array"
},
"categoryName": {
"type": "string"
"type": [
"null",
"string"
]
},
"family": {
"type": "string"
"type": [
"null",
"string"
]
},
"feesExpensesInvestment": {
"$ref": "#/definitions/FundProfileFeesExpensesInvestment"
Expand Down Expand Up @@ -1543,7 +1538,10 @@
"yahooFinanceType": "number"
},
"styleBoxUrl": {
"type": "string"
"type": [
"null",
"string"
]
},
"subseqAipInvestment": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -1592,7 +1590,6 @@
}
},
"required": [
"annualReportExpenseRatio",
"projectionValues"
],
"type": "object"
Expand Down Expand Up @@ -1620,7 +1617,6 @@
}
},
"required": [
"annualReportExpenseRatio",
"projectionValuesCat"
],
"type": "object"
Expand Down Expand Up @@ -1656,6 +1652,7 @@
"Buy",
"",
"Equal-Weight",
"Fair Value",
"Equal-weight",
"Long-term Buy",
"Hold",
Expand All @@ -1667,6 +1664,7 @@
"In-Line",
"Outperform",
"Overweight",
"Peer Perform",
"Perform",
"Positive",
"Reduce",
Expand Down Expand Up @@ -1885,19 +1883,19 @@
"yahooFinanceType": "number"
},
"discontinuedOperations": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"ebit": {
"yahooFinanceType": "number"
},
"effectOfAccountingCharges": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"endDate": {
"yahooFinanceType": "date"
},
"extraordinaryItems": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"grossProfit": {
"yahooFinanceType": "number"
Expand All @@ -1915,7 +1913,7 @@
"yahooFinanceType": "number"
},
"minorityInterest": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"netIncome": {
"yahooFinanceType": "number"
Expand All @@ -1927,19 +1925,19 @@
"yahooFinanceType": "number"
},
"nonRecurring": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"operatingIncome": {
"yahooFinanceType": "number"
},
"otherItems": {
"$ref": "#/definitions/DiscontinuedOperations"
"yahooFinanceType": "number|null"
},
"otherOperatingExpenses": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"researchDevelopment": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"sellingGeneralAdministrative": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -2465,21 +2463,13 @@
"exchangeDataDelayedBy",
"maxAge",
"priceHint",
"regularMarketChangePercent",
"regularMarketChange",
"regularMarketTime",
"regularMarketPrice",
"regularMarketPreviousClose",
"regularMarketSource",
"quoteType",
"symbol",
"underlyingSymbol",
"shortName",
"longName",
"lastMarket",
"marketState",
"currency",
"currencySymbol",
"fromCurrency",
"toCurrency"
],
Expand Down Expand Up @@ -3816,7 +3806,14 @@
"type": "string"
},
"firstTradeDateEpochUtc": {
"yahooFinanceType": "number"
"anyOf": [
{
"type": "null"
},
{
"yahooFinanceType": "date"
}
]
},
"gmtOffSetMilliseconds": {
"yahooFinanceType": "number"
Expand Down Expand Up @@ -3989,22 +3986,22 @@
"additionalProperties": false,
"properties": {
"avg": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"growth": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"high": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"low": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"numberOfAnalysts": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"yearAgoRevenue": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand Down Expand Up @@ -4654,13 +4651,6 @@
"priceHint",
"previousClose",
"regularMarketPreviousClose",
"averageVolume",
"averageVolume10days",
"averageDailyVolume10Day",
"fiftyTwoWeekLow",
"fiftyTwoWeekHigh",
"fiftyDayAverage",
"twoHundredDayAverage",
"currency",
"fromCurrency",
"toCurrency",
Expand Down
Loading

0 comments on commit bc47bdf

Please sign in to comment.