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] Fix Provider Interface Body Assignment Of Dict-Like Parameters #6561

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

deeleeramone
Copy link
Contributor

  1. Why?:

    • Adding query parameters of Dict-Type in Provider Interface models were not being sent to the request body and the application fails to import.
  2. What?:

    • Add a check in _create_field before if query to look at the annotation's __name__, and if it is in ["Dict", "dict", "Data"], the field will be converted to a Body parameter.
  3. Impact:

    • More flexibility. Best practice would be to make the function a PUT or POST. GET does work, but it is not compatible with the current Swagger configuration.
  4. Testing Done:

image

Curl also works with GET, it's just Swagger that is not happy with that request pattern.

@deeleeramone deeleeramone added bug Fix bug platform OpenBB Platform labels Jul 3, 2024
@github-actions github-actions bot added the v4 PRs for v4 label Jul 3, 2024
@IgorWounds IgorWounds added this pull request to the merge queue Jul 4, 2024
Merged via the queue into develop with commit 5ba5472 Jul 4, 2024
10 checks passed
@IgorWounds IgorWounds deleted the bugfix/pi-dict-field branch July 4, 2024 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants