Skip to content

Commit

Permalink
fix(chart/validation): commit updated schema and http fixture (#662)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadicc committed Sep 4, 2023
1 parent 5f8e567 commit e99cb18
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 12 deletions.
24 changes: 12 additions & 12 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,31 +309,31 @@
"high": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"low": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"open": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"close": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"volume": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
}
},
Expand All @@ -351,7 +351,7 @@
"adjclose": {
"type": "array",
"items": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
}
}
Expand Down Expand Up @@ -402,22 +402,22 @@
"yahooFinanceType": "date"
},
"high": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"low": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"open": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"close": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"volume": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
},
"adjclose": {
"yahooFinanceType": "number"
"yahooFinanceType": "number|null"
}
},
"required": [
Expand Down
70 changes: 70 additions & 0 deletions tests/http/chart-WSU.DE-2023-08-04-to-2023-08-09.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"request": {
"url": "https://query2.finance.yahoo.com/v8/finance/chart/WSU.DE?useYfid=true&interval=1d&includePrePost=true&events=div%7Csplit%7Cearn&lang=en-US&period1=1691107200&period2=1691539200"
},
"response": {
"ok": true,
"status": 200,
"statusText": "OK",
"headers": {
"content-type": [
"application/json;charset=utf-8"
],
"cache-control": [
"public, max-age=10, stale-while-revalidate=20"
],
"vary": [
"Origin,Accept-Encoding"
],
"y-rid": [
"0psfdllifb6ns"
],
"x-yahoo-request-id": [
"0psfdllifb6ns"
],
"x-request-id": [
"dad202de-8136-4ccf-ae1d-d875be3a72e2"
],
"content-length": [
"1066"
],
"x-envoy-upstream-service-time": [
"29"
],
"date": [
"Mon, 04 Sep 2023 08:53:16 GMT"
],
"server": [
"ATS"
],
"x-envoy-decorator-operation": [
"finance-chart-api--mtls-production-ir2.finance-k8s.svc.yahoo.local:4080/*"
],
"age": [
"0"
],
"strict-transport-security": [
"max-age=31536000"
],
"referrer-policy": [
"no-referrer-when-downgrade"
],
"x-frame-options": [
"SAMEORIGIN"
],
"connection": [
"close"
],
"expect-ct": [
"max-age=31536000, report-uri=\"http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only\""
],
"x-xss-protection": [
"1; mode=block"
],
"x-content-type-options": [
"nosniff"
]
},
"body": "{\"chart\":{\"result\":[{\"meta\":{\"currency\":\"EUR\",\"symbol\":\"WSU.DE\",\"exchangeName\":\"GER\",\"instrumentType\":\"EQUITY\",\"firstTradeDate\":910598400,\"regularMarketTime\":1693812773,\"gmtoffset\":7200,\"timezone\":\"CEST\",\"exchangeTimezoneName\":\"Europe/Berlin\",\"regularMarketPrice\":33.35,\"chartPreviousClose\":34.25,\"priceHint\":2,\"currentTradingPeriod\":{\"pre\":{\"timezone\":\"CEST\",\"start\":1693803600,\"end\":1693810800,\"gmtoffset\":7200},\"regular\":{\"timezone\":\"CEST\",\"start\":1693810800,\"end\":1693841400,\"gmtoffset\":7200},\"post\":{\"timezone\":\"CEST\",\"start\":1693841400,\"end\":1693852200,\"gmtoffset\":7200}},\"dataGranularity\":\"1d\",\"range\":\"\",\"validRanges\":[\"1d\",\"5d\",\"1mo\",\"3mo\",\"6mo\",\"1y\",\"2y\",\"5y\",\"10y\",\"ytd\",\"max\"]},\"timestamp\":[1691132400,1691391600,1691478000],\"indicators\":{\"quote\":[{\"high\":[34.54999923706055,null,34.20000076293945],\"low\":[34.099998474121094,null,32.900001525878906],\"close\":[34.45000076293945,null,33.20000076293945],\"volume\":[1251,null,10846],\"open\":[34.25,null,34.04999923706055]}],\"adjclose\":[{\"adjclose\":[34.45000076293945,null,33.20000076293945]}]}}],\"error\":null}}"
}
}

0 comments on commit e99cb18

Please sign in to comment.