stoplightio / elements

Build beautiful, interactive API Docs with embeddable React or Web Components, powered by OpenAPI and Markdown.
https://stoplight.io/open-source/elements/
Apache License 2.0
1.81k stars 205 forks source link

feat: does not display "No supported" message if there is no body #2632

Closed kohkimakimoto closed 3 months ago

kohkimakimoto commented 3 months ago

Elements Default PR Template

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

This PR prevents the “No supported response body returned” message from being displayed when the response body is empty.

In the current implementation, Elements displays the “No supported response body returned” message in the "TryIt" response area when it receives an empty response body from the API server. This message can be misleading because some API servers may intentionally return an empty response body during normal operations.

For example, the "Star a gist" endpoint in the GitHub API:

https://docs.github.com/en/rest/gists/gists?apiVersion=2022-11-28#star-a-gist

Current implementation

Fixed implementation

netlify[bot] commented 3 months ago

Deploy Preview for stoplight-elements ready!

Name Link
Latest commit af9a2eb4583cb0b7f9334d362debb19391c0f52f
Latest deploy log https://app.netlify.com/sites/stoplight-elements/deploys/66bcc7833cd3590008e31877
Deploy Preview https://deploy-preview-2632--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] commented 3 months ago

Deploy Preview for stoplight-elements-demo ready!

Name Link
Latest commit af9a2eb4583cb0b7f9334d362debb19391c0f52f
Latest deploy log https://app.netlify.com/sites/stoplight-elements-demo/deploys/66bcc783a5b0010008f9942e
Deploy Preview https://deploy-preview-2632--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.