这是indexloc提供的服务,不要输入任何密码
Skip to content

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
@danielgtaylor danielgtaylor force-pushed the prevent-json-for-image-response branch from fd841f9 to 72b4efc Compare February 16, 2024 04:32
@codecov
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
@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

2 participants