Fixes spec for #stop writing swagger docs

This commit is contained in:
Jay Danielian 2019-07-17 20:35:56 -04:00
parent 5e71651d6d
commit 659b328eda

View File

@ -35,7 +35,7 @@ module Rswag
def stop(_notification = nil)
@config.swagger_docs.each do |url_path, doc|
# remove 2.0 parameters
doc[:paths].each_pair do |_k, v|
doc[:paths]&.each_pair do |_k, v|
v.each_pair do |_verb, value|
is_hash = value.is_a?(Hash)
if is_hash && value.dig(:parameters)