elements icon indicating copy to clipboard operation
elements copied to clipboard

fix: Content-Type header added despite no request body defined in POST/PUT/PATCH endpoints

Open nikrooz opened this issue 1 year ago • 7 comments

Addressed

https://github.com/stoplightio/elements/issues/2734

Changes

If no request body is defined, the Content-Type header should not be included.

Screenshot

Screenshot 2024-11-22 at 12 41 54

Elements Default PR Template

In general, make sure you have: (check the boxes to acknowledge you've followed this template)

  • [x] Read CONTRIBUTING.md

Other Available PR Templates:

  • Release: https://github.com/stoplightio/elements/compare?template=release.md
    • [ ] Read the release section of CONTRIBUTING.md

nikrooz avatar Nov 22 '24 12:11 nikrooz

Deploy Preview for stoplight-elements-demo ready!

Name Link
Latest commit 3c830a13f64a7b54a51d57ad45381ac546d57d84
Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/679ce87ba2c7810008624092
Deploy Preview https://deploy-preview-2739--stoplight-elements-demo.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 22 '24 12:11 netlify[bot]

Deploy Preview for stoplight-elements ready!

Name Link
Latest commit 3c830a13f64a7b54a51d57ad45381ac546d57d84
Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/679ce87b5fe0800008f20287
Deploy Preview https://deploy-preview-2739--stoplight-elements.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 22 '24 12:11 netlify[bot]

I would greatly appreciate it if someone could review this. Thank you! CC @mnaumanali94

nikrooz avatar Nov 27 '24 10:11 nikrooz

@nikrooz The code looks good, but if you want for these changes to be released after merging, you have to bump up versions in the proper package.json files. Please make sure to read our Versioning Gudelines.

cc. @mnaumanali94

darekplawecki avatar Dec 09 '24 09:12 darekplawecki

@darekplawecki Thank you for your comments. I've updated the version; please let me know if there's anything else

~~On a different note, the e2e-react-cra is failing on the main branch due to type conflicts introduced by the release of React 19. I resolved this issue in my PR by adding a resolution for @types/react to the react-cra example.~~

Update: since the fix landed in main https://github.com/stoplightio/elements/pull/2750, I removed my fix commit in this PR

nikrooz avatar Dec 09 '24 11:12 nikrooz

Hi team, any chance we can review this and get it merged. Thanks!

nikrooz avatar Dec 19 '24 17:12 nikrooz

@darekplawecki Could you please take another look at this? I would greatly appreciate it, as our upcoming release is currently blocked by this fix.

nikrooz avatar Jan 07 '25 09:01 nikrooz