lib/jdoc/link.rb in jdoc-0.3.3 vs lib/jdoc/link.rb in jdoc-0.3.4
- old
+ new
@@ -143,10 +143,10 @@
end
end
# @return [true, false] True if this endpoint must have request body
def has_request_body?
- ["PATCH", "POST", "PUT"].include?(method)
+ ["PATCH", "POST", "PUT"].include?(method) && !request_parameters.empty?
end
# We have a policy that we should not return response body to PUT and DELETE requests.
# @return [true, false] True if this endpoint must have response body
def has_response_body?