Add way for examples generation from responses

This commit is contained in:
Pavel Bezpalov
2017-01-13 01:05:17 +02:00
parent 77d4cbe0ea
commit 98d5b982c4
4 changed files with 24 additions and 1 deletions

View File

@@ -25,6 +25,12 @@ module Rswag
end
end
def swagger_dry_run
@swagger_dry_run ||= begin
@rspec_config.swagger_dry_run.nil? || @rspec_config.swagger_dry_run
end
end
def get_swagger_doc(name)
return swagger_docs.values.first if name.nil?
raise ConfigurationError, "Unknown swagger_doc '#{name}'" unless swagger_docs[name]