Skip to content

fix: compare MediaType with wildcards - #318

Open
adrienyhuel wants to merge 1 commit into
pb33f:mainfrom
adrienyhuel:fix/response-mediatype-wildcards
Open

fix: compare MediaType with wildcards#318
adrienyhuel wants to merge 1 commit into
pb33f:mainfrom
adrienyhuel:fix/response-mediatype-wildcards

Conversation

@adrienyhuel

Copy link
Copy Markdown

When checking for a matching response in OpenAPI with ContentType from responss body, match OpenAPI spec wildcards

New "extractContentType" function copied and adapted from the same function in requests/validate_body.go

Closes #316

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (f309f59) to head (1d43d03).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage   98.27%   98.27%           
=======================================
  Files          75       75           
  Lines        9192     9205   +13     
=======================================
+ Hits         9033     9046   +13     
  Misses        132      132           
  Partials       27       27           
Flag Coverage Δ
unittests 98.27% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Response validation doesn't support media types with wildcards

1 participant