Skip to content
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/QuoteSummaryResult (additionalProperty: 'twitter') #418

Closed
dtslvr opened this issue Feb 26, 2022 · 3 comments
Labels
bug Something isn't working released validation Issues related to validation

Comments

@dtslvr
Copy link
Contributor

dtslvr commented Feb 26, 2022

Validation Error

Minimal Reproduction

const quoteSummary = await yahooFinance.quoteSummary('ADA-USD', {
  modules: ['price', 'summaryProfile']
});

Symbol(s) that it happened for

  • ADA-USD

Error Message

The following result did not validate with schema: #/definitions/QuoteSummaryResult
[
  {
    instancePath: '/summaryProfile',
    schemaPath: '#/definitions/SummaryProfile/additionalProperties',
    keyword: 'additionalProperties',
    params: { additionalProperty: 'twitter' },
    message: 'must NOT have additional properties',
    data: {
      companyOfficers: [],
      twitter: 'cardano',
      name: 'Cardano',
      startDate: 2017-10-01T00:00:00.000Z,
      description: 'Cardano (ADA) is a cryptocurrency launched in 2017. Users are able to generate ADA through the process of mining. Cardano has a current supply of 33,865,878,493.804 with 34,159,578,343.084 in circulation. The last known price of Cardano is 1.23810133 USD and is down -2.94 over the last 24 hours. It is currently trading on 296 active market(s) with $1,366,111,865.81 traded over the last 24 hours. More information can be found at https://www.cardano.org.',
      maxAge: 86400
    }
  }
]

Environment

Browser or Node: Node
Library version: 2.1.8

Additional Context

The validator seems to have a problem with the twitter attribute 😄

@dtslvr dtslvr added bug Something isn't working validation Issues related to validation labels Feb 26, 2022
@gadicc gadicc closed this as completed in 1c7c1cb Feb 27, 2022
@gadicc
Copy link
Owner

gadicc commented Feb 27, 2022

Thanks for another report, @dtslvr. We now accept this field in assetProfile and summaryProfile.

When #401 lands, we'll be a bit less sensitive to additionalProperties (especially since Yahoo keep adding new ones from time to time and it breaks validation).

gadicc pushed a commit that referenced this issue Feb 27, 2022
## [2.1.9](v2.1.8...v2.1.9) (2022-02-27)

### Bug Fixes

* **quoteSummary:** add twitter? to {asset,summary}Profile (fixes [#418](#418)) ([1c7c1cb](1c7c1cb))
@gadicc
Copy link
Owner

gadicc commented Feb 27, 2022

🎉 This issue has been resolved in version 2.1.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dtslvr
Copy link
Contributor Author

dtslvr commented Feb 27, 2022

Thanks for another report, @dtslvr. We now accept this field in assetProfile and summaryProfile.

Thank you @gadicc ❤️

When #401 lands, we'll be a bit less sensitive to additionalProperties (especially since Yahoo keep adding new ones from time to time and it breaks validation).

That sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released validation Issues related to validation
Projects
None yet
Development

No branches or pull requests

2 participants