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

fix: do not generate json response for binary outputs #247

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

danielgtaylor
Copy link
Owner

@danielgtaylor danielgtaylor commented Feb 16, 2024

Prevent generating a default application/json response when there is already a response defined, for example when returning binary outputs like images.

Fixes #246

@danielgtaylor danielgtaylor changed the title Add image response support fix: do not generate json response for binary outputs Feb 16, 2024
chore: remove unnecessary test case in API tests
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0759ef2) 94.51% compared to head (72b4efc) 94.51%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #247   +/-   ##
=======================================
  Coverage   94.51%   94.51%           
=======================================
  Files          18       18           
  Lines        2660     2660           
=======================================
  Hits         2514     2514           
  Misses        107      107           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit dbfb20c into main Feb 16, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the prevent-json-for-image-response branch February 16, 2024 04:37
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.

How to explicitly define response for a route
1 participant