Modifies parameters and body request/responses to output 3.0 syntax for basic operations.

SwaggerEditor passes basic output
This commit is contained in:
Jay Danielian
2019-07-14 17:28:11 -04:00
parent 23349b2678
commit c820bb75e0
7 changed files with 226 additions and 85 deletions

View File

@@ -6,7 +6,7 @@ namespace :rswag do
desc 'Generate Swagger JSON files from integration specs'
RSpec::Core::RakeTask.new('swaggerize') do |t|
t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'
# TODO: fix this, as dry-run is always true despite what is in the config
# NOTE: rspec 2.x support
if Rswag::Specs::RSPEC_VERSION > 2 && Rswag::Specs.config.swagger_dry_run
t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--dry-run', '--order defined' ]