def generate_swagger_file
      delete_file_before
      File.open(@swagger_file, 'a+') do |file|
        file.write(if SwaggerDocsGenerator.configure.compress
                     write_in_swagger_file.to_json
                   else
                     JSON.pretty_generate write_in_swagger_file
                   end)
      end
    end
def generate_swagger_file
      delete_file_before
      File.open(@swagger_file, 'a+') do |file|
        file.write(if SwaggerDocsGenerator.configure.compress
                     write_in_swagger_file.to_json
                   else
                     JSON.pretty_generate write_in_swagger_file
                   end)
      end
    end
Open or create a swagger.json file