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

Allow relaxed Content-Type for atomic operations #1553

Merged
merged 1 commit into from
May 25, 2024

Conversation

bkoelman
Copy link
Member

@bkoelman bkoelman commented May 25, 2024

This PR permits using a relaxed (simpler) variant of the atomic:operations media type in the Content-Type request/response HTTP header, because OpenAPI client generators often choke on the double quotes in the official media type (producing code that doesn't compile). By default, the Content-Type used for responses is the same as the incoming one, although it can be overruled by sending an Accept HTTP header.

Official header value (existing):
application/vnd.api+json; ext="https://jsonapi.org/ext/atomic"
Relaxed variant (added in this PR):
application/vnd.api+json; ext=atomic-operations

QUALITY CHECKLIST

…ia type in the Content-Type request/response HTTP header, because OpenAPI code generators often choke on the double quotes in the official media type (producing code that doesn't compile). By default, the Content-Type used for responses is the same as the incoming one, although it can be overruled by sending an Accept HTTP header.
@bkoelman bkoelman force-pushed the relaxed-operations-media-type branch from ede4029 to 94d7332 Compare May 25, 2024 18:43
Copy link

codecov bot commented May 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.84%. Comparing base (a8ff4ec) to head (94d7332).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1553      +/-   ##
==========================================
+ Coverage   90.81%   90.84%   +0.02%     
==========================================
  Files         346      346              
  Lines       11063    11097      +34     
  Branches     1815     1821       +6     
==========================================
+ Hits        10047    10081      +34     
  Misses        669      669              
  Partials      347      347              

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

@bkoelman bkoelman marked this pull request as ready for review May 25, 2024 19:54
@bkoelman bkoelman merged commit 32cc3b5 into master May 25, 2024
16 checks passed
@bkoelman bkoelman deleted the relaxed-operations-media-type branch May 25, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant