-
Notifications
You must be signed in to change notification settings - Fork 756
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
fix(io): Pandas OpenAPI schema #3032
Conversation
Bug Fix: PandasDataFrame orient does not change open api schema generation to expected format. Bug Fix: PandasSeries orient does not change open api schema generation to expected format. Separated openapi schema generation for each. PandasSeries from_http_request() seem to be missing io.BytesIO. Added it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great other than one minor nit, thank you!
Codecov Report
@@ Coverage Diff @@
## main #3032 +/- ##
==========================================
- Coverage 62.82% 53.55% -9.28%
==========================================
Files 145 109 -36
Lines 11831 10655 -1176
==========================================
- Hits 7433 5706 -1727
- Misses 4398 4949 +551
|
Co-authored-by: Sauyon Lee <2347889+sauyon@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for spotting this out.
Can you run |
Yes! Ran |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes LGTM. The CI seems to fail out of nowhere. I will investigate this later. Thanks for the contribution.
Bug Fix: PandasDataFrame orient does not change open api schema generation to expected format.
Bug Fix: PandasSeries orient does not change open api schema generation to expected format.
Separated openapi schema generation for each.
PandasSeries from_http_request() seem to be missing io.BytesIO. Added it.
What does this PR address?
When specifying the pandas PandasDataFrame and PandasSeries input spec the generated open api schemas do not match the expected schema with the provided orient parameter. This shows in the bento serve index webpage in the request body and successful response output sections. This PR seeks to address this by adding orient to the schema generation in addition to the existing the dtype dict parameter (Dataframe) or dtype str parameter (Series) to return the correct Schema.
Fixes #(issue)
Before submitting:
guide on how to create a pull request.
make format
andmake lint
script have passed (instructions)?those accordingly? Here are documentation guidelines and tips on writting docs.