lib/dry/swagger/tasks/configuration_generator.rake in dry-swagger-1.0.0 vs lib/dry/swagger/tasks/configuration_generator.rake in dry-swagger-2.0.0

- old
+ new

@@ -1,27 +1,20 @@ require 'fileutils' namespace 'dry-swagger' do - desc 'Create a configuration file for Struct and Contract' + desc 'Create a configuration file for Dry Swagger Documentation Generator' task :create_configuration_file do FileUtils.mkdir_p "#{ Dir.pwd }/config/initializers/" puts "Created #{ Dir.pwd }/config/initializers/dry-swagger.rb" File.open("#{ Dir.pwd }/config/initializers/dry-swagger.rb", "w") { |file| -file.puts 'Dry::Swagger::Config::StructConfiguration.configuration do |config| +file.puts 'Dry::Swagger::Config::SwaggerConfiguration.configuration do |config| config.enable_required_validation = true config.enable_nullable_validation = true config.enable_enums = true config.enable_descriptions = true config.nullable_type = :"x-nullable" # or :nullable end - -Dry::Swagger::Config::ContractConfiguration.configuration do |config| - config.enable_required_validation = true - config.enable_nullable_validation = true - config.enable_enums = true - config.enable_descriptions = true - config.nullable_type = :"x-nullable" # or :nullable -end' +' } end desc 'Create a YAML file for Contract swagger field descriptions' task :create_contract_descriptions_yaml do \ No newline at end of file