-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed validation: #/definitions/QuoteResponseArray #636
Comments
Hey @pazer001, thanks for another report. This "looks" like a bug but it actually isn't. It's the "(OR, we may just be protecting you from "bad" data sometimes stored for e.g. misspelt symbols on Yahoo's side)" one. I'll break it down symbol by symbol:
Hope this helps! |
thanks, ill check. |
Ok great, thanks for reporting back! 🙏 |
I seem to be getting this error for "schemaPath": "#/definitions/QuoteEquity/additionalProperties",
"keyword": "additionalProperties",
"params": {
"additionalProperty": "fiftyTwoWeekChangePercent"
},
"message": "must NOT have additional properties", |
"pageViewGrowthWeekly", "openInterest", + "dividendRate", + "dividendYield", "headSymbolAsString", "contractSymbol", "underlyingExchangeSymbol", diff --git a/src/modules/quote.ts b/src/modules/quote.ts index 209862d..08cb5ab 100644 --- a/src/modules/quote.ts +++ b/src/modules/quote.ts @@ -37,6 +37,7 @@ export interface QuoteBase { fiftyTwoWeekHighChangePercent?: number; // -0.07712155, fiftyTwoWeekLow?: number; // 180.68, fiftyTwoWeekHigh?: number; // 589.07, + fiftyTwoWeekChangePercent?: number; // 22.604025
Thanks for the report, @martinnormark. What version of yahoo-finance2 are you using? We've been quite permissive about "additional properties" for a while now, but maybe there's a bug somewhere. In any case, I added |
I'm using v2.4.4 - thanks for swift response, I temporarily disabled validation for this request. I tried to find guidelines on how to easily refresh the schema test files, I looked at your recent change at it seems to be autogenerated. Is there a script to generate the test files |
## [2.4.5](v2.4.4...v2.4.5) (2023-09-03) ### Bug Fixes * **quote:** schema dividend{Rate,Yield}, 52wkChngPercent (fixes [#636](#636)) ([4e6ed20](4e6ed20))
🎉 This issue has been resolved in version 2.4.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
My pleasure. And good question! There's some info about this in the docs, but maybe it's not so easy to find. See https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/validation.md#help-fix, especially the section at the very bottom. But briefly:
The last point (3) above means if all tests are passing but we want to see if something in the Yahoo response has changed, we can simply delete the cached json file, rerun the test, and see if it still passes. Otherwise make changes to accommodate the new information being returned. Hope this helps... very happy to help others who want to get involved contributing validation updates :) |
## [2.4.5](v2.4.4...v2.4.5) (2023-09-03) ### Bug Fixes * **quote:** schema dividend{Rate,Yield}, 52wkChngPercent (fixes [#636](#636)) ([4e6ed20](4e6ed20))
Validation Error
Minimal Reproduction
Symbol(s) that it happened for
Error Message
Environment
Browser or Node: node
Node version (if applicable): 20.0
Npm version:
Browser verion (if applicable):
Library version (e.g.
1.10.1
):Additional Context
The text was updated successfully, but these errors were encountered: