Skip to content

fix: Use source "response.text" for any mime-type starting with text/ #780

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

Closed

Conversation

fdintino
Copy link
Contributor

Responses with Content-Type: text/csv or Content-Type: text/xml ought to be treated the same as text/html

Responses with "Content-Type: text/csv" or "Content-Type: text/xml"
ought to be treated the same as text/html
@dbanty
Copy link
Collaborator

dbanty commented Jul 23, 2023

Awesome, thanks! I don't think we have any e2e tests for text-based responses yet. Could you add something to end_to_end_tests/openapi.json for some common ones (maybe text/html, text/csv, text/plain)? More details in CONTRIBUTING.md

@codecov
Copy link

codecov bot commented Jul 23, 2023

Codecov Report

Merging #780 (e8a0ce3) into main (7b38b52) will decrease coverage by 0.06%.
The diff coverage is 50.00%.

@@             Coverage Diff             @@
##              main     #780      +/-   ##
===========================================
- Coverage   100.00%   99.94%   -0.06%     
===========================================
  Files           49       49              
  Lines         1971     1973       +2     
===========================================
+ Hits          1971     1972       +1     
- Misses           0        1       +1     
Impacted Files Coverage Δ
openapi_python_client/parser/responses.py 97.67% <50.00%> (-2.33%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dbanty dbanty mentioned this pull request Aug 1, 2023
@dbanty
Copy link
Collaborator

dbanty commented Aug 13, 2023

Will resolve #797 and #821 once completed

@dbanty
Copy link
Collaborator

dbanty commented Dec 4, 2023

Replaced with #897 since I can't edit this PR.

@dbanty dbanty closed this Dec 4, 2023
dbanty added a commit that referenced this pull request Dec 6, 2023
Replaces #780.

Closes #797, #821

TODO:

- [x] Fix unnecessary cast

---------

Co-authored-by: Frankie Dintino <fdintino@gmail.com>
Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants