Skip to content

fix: add media type context to property deprecation messages#786

Merged
reuvenharrison merged 5 commits intomainfrom
fix-594-media-type-context
Feb 3, 2026
Merged

fix: add media type context to property deprecation messages#786
reuvenharrison merged 5 commits intomainfrom
fix-594-media-type-context

Conversation

@reuvenharrison
Copy link
Collaborator

Summary

  • Adds media type context to property deprecation messages when multiple media types exist
  • Removes the deduplication workaround that was hiding duplicate reports
  • Creates helper functions for formatting media type details

Fixes #594

Test plan

  • All existing tests pass
  • New tests verify distinct messages per media type
  • Messages show (media type: application/json) when multiple media types exist
  • Single media type specs show no extra context (keeps messages concise)

🤖 Generated with Claude Code

reuvenharrison and others added 2 commits February 3, 2026 13:17
When multiple media types share the same schema, property deprecation
changes were reported multiple times with identical messages. This fix:

- Adds media type context to messages when multiple media types exist
- Removes the deduplication workaround that hid duplicate reports
- Creates helper functions for formatting media type details

Messages now show: "property 'x' deprecated (media type: application/json)"
instead of appearing as duplicates.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 93.68030% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.45%. Comparing base (da70772) to head (a2a36ed).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
checker/check_request_property_min_items_set.go 50.00% 2 Missing ⚠️
checker/check_request_property_min_set.go 50.00% 2 Missing ⚠️
checker/check_request_property_min_updated.go 66.66% 2 Missing ⚠️
checker/check_response_property_max_increased.go 50.00% 2 Missing ⚠️
checker/check_response_property_min_decreased.go 50.00% 2 Missing ⚠️
checker/check_response_property_min_items_unset.go 50.00% 2 Missing ⚠️
...cker/check_request_property_min_items_increased.go 75.00% 1 Missing ⚠️
...er/check_response_property_max_length_increased.go 75.00% 1 Missing ⚠️
...hecker/check_response_property_max_length_unset.go 75.00% 1 Missing ⚠️
...ker/check_response_property_min_items_decreased.go 75.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #786      +/-   ##
==========================================
+ Coverage   89.40%   89.45%   +0.04%     
==========================================
  Files         248      249       +1     
  Lines       12354    12409      +55     
==========================================
+ Hits        11045    11100      +55     
  Misses        862      862              
  Partials      447      447              
Flag Coverage Δ
unittests 89.45% <93.68%> (+0.04%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

reuvenharrison and others added 3 commits February 3, 2026 13:25
Extends the media type context pattern to:
- check_request_property_type_changed.go
- check_response_property_type_changed.go
- check_request_property_enum_value_updated.go
- check_response_property_enum_value_removed.go

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Extends media type context to all remaining property checks:
- Request property checks (default value, enum, type constraints, etc.)
- Response property checks (all variants)
- Discriminator checks (request and response)

Updates test expectations to account for new media type details.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@reuvenharrison reuvenharrison merged commit 097780e into main Feb 3, 2026
8 checks passed
@reuvenharrison reuvenharrison deleted the fix-594-media-type-context branch February 3, 2026 16:27
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.

Infos/result are reported multiple times

2 participants