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

[BugFix] Use __alias_dict__ instead of Field(alias) for data fields. #6673

Merged
merged 7 commits into from
Sep 17, 2024

Conversation

deeleeramone
Copy link
Contributor

  1. Why?:

    • OpenAPI gets confused by having Field(alias='someAlias') and will end up labeling the Field as the Alias unless we use__alias_dict__.
  2. What?:

    • Moves the alias definition from Field to __alias_dict__
  3. Impact:

    • A few Finviz field names have been adjusted to be more like the others.
    • Improved data model schemas in openapi.json
  4. Testing Done:

    • Ran the test suites

@deeleeramone deeleeramone added bug Fix bug platform OpenBB Platform v4 PRs for v4 labels Sep 17, 2024
@piiq
Copy link
Contributor

piiq commented Sep 17, 2024

@andrewkenreich @tehcoderer please take a look at this one to see if there are any changes introduced here are breaking for you.
Apart from the Finviz (which IIUC is not used by the app side) we don't expect the API to change, but it's better to be on the safe side and that's why I'm tagging you.

@@ -29,12 +29,12 @@ class IntrinioShareStatisticsData(ShareStatisticsData):

__alias_dict__ = {
"outstanding_shares": "weightedavebasicdilutedsharesos",
"adjusted_outstanding_shares": "adjweightedavebasicdilutedsharesos",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@andrewkenreich
Copy link
Contributor

We are actually doing this already on our end, so this is good

@IgorWounds IgorWounds added this pull request to the merge queue Sep 17, 2024
Merged via the queue into develop with commit 466b16b Sep 17, 2024
10 checks passed
@piiq piiq deleted the bugfix/data-field-aliases branch September 18, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking_change bug Fix bug platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants