You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request body should be sent for DELETE requests. It's worth noting that DELETE requests with request body is NOT against the specs. There might be many legacy apis that developers are documenting, which may have a DELEET endpoint with request body. Open Api Spec also supports DELETE requests with body. https://spec.openapis.org/oas/v3.1.0#version-3-1-0
Use try-it widget to make a DELETE request with request body. Note how in the screenshot below, it is documented that the endpoint accepts some body, but "Request Sample" does not reflect the same
Environment
Version used:
Environment name and version (e.g. Chrome 39, node.js 5.4):
Operating System and version (desktop or mobile):
Link to your environment/workspace/project:
The text was updated successfully, but these errors were encountered:
@mnaumanali94 I agree, thats a good way to split it. When there is a SHOULD that means people could. Spectral can help make things better, and Elements should show whatever it understands regardless of opinion. IMO. :D
Context
When making an api request with method DELETE which has some body, the body is not sent. This seems to be intentional as per these lines:
elements/packages/elements-core/src/components/TryIt/build-request.ts
Line 66 in b20ba44
Current Behavior
As explained above
Expected Behavior
Request body should be sent for DELETE requests. It's worth noting that DELETE requests with request body is NOT against the specs. There might be many legacy apis that developers are documenting, which may have a DELEET endpoint with request body. Open Api Spec also supports DELETE requests with body. https://spec.openapis.org/oas/v3.1.0#version-3-1-0
Related issues on OAS: OAI/OpenAPI-Specification#1801, OAI/OpenAPI-Specification#2117
Steps to Reproduce
Environment
The text was updated successfully, but these errors were encountered: