forked from loafle/openapi-generator-original
[Ruby] Add Rakefile and Gemfile (#4448)
* Add Rakefile, Gemfile, and update client generator * Update sample
This commit is contained in:
parent
d52f5a3133
commit
e189388371
@ -250,6 +250,8 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
|
||||
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
|
||||
supportingFiles.add(new SupportingFile("Rakefile.mustache", "", "Rakefile"));
|
||||
supportingFiles.add(new SupportingFile("Gemfile.mustache", "", "Gemfile"));
|
||||
|
||||
// test files should not be overwritten
|
||||
writeOptional(outputFolder, new SupportingFile("rspec.mustache", "", ".rspec"));
|
||||
|
@ -0,0 +1,7 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake', '~> 12.0.0'
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
begin
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
task default: :spec
|
||||
rescue LoadError
|
||||
# no rspec available
|
||||
end
|
@ -1,4 +1,7 @@
|
||||
source "http://rubygems.org"
|
||||
source 'https://rubygems.org'
|
||||
|
||||
# Specify dependencies in swagger.gemspec
|
||||
gemspec
|
||||
|
||||
group :development, :test do
|
||||
gem 'rake', '~> 12.0.0'
|
||||
end
|
||||
|
@ -8,7 +8,7 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
||||
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
||||
|
||||
## Installation
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
require 'bundler'
|
||||
Bundler::GemHelper.install_tasks
|
||||
begin
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
require 'swagger'
|
||||
|
||||
RSpec::Core::RakeTask.new('spec')
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
task default: :spec
|
||||
rescue LoadError
|
||||
# no rspec available
|
||||
end
|
||||
|
@ -14,6 +14,8 @@ Method | HTTP request | Description
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
To test \"client\" model
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
@ -142,6 +144,8 @@ nil (empty response body)
|
||||
|
||||
To test enum parameters
|
||||
|
||||
To test enum parameters
|
||||
|
||||
### Example
|
||||
```ruby
|
||||
# load the gem
|
||||
|
@ -20,7 +20,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# To test \"client\" model
|
||||
#
|
||||
# To test \"client\" model
|
||||
# @param body client model
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Client]
|
||||
@ -30,7 +30,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# To test \"client\" model
|
||||
#
|
||||
# To test \"client\" model
|
||||
# @param body client model
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @return [Array<(Client, Fixnum, Hash)>] Client data, response status code and response headers
|
||||
@ -223,7 +223,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# To test enum parameters
|
||||
#
|
||||
# To test enum parameters
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :enum_form_string_array Form parameter enum test (string array)
|
||||
# @option opts [String] :enum_form_string Form parameter enum test (string) (default to -efg)
|
||||
@ -240,7 +240,7 @@ module Petstore
|
||||
end
|
||||
|
||||
# To test enum parameters
|
||||
#
|
||||
# To test enum parameters
|
||||
# @param [Hash] opts the optional parameters
|
||||
# @option opts [Array<String>] :enum_form_string_array Form parameter enum test (string array)
|
||||
# @option opts [String] :enum_form_string Form parameter enum test (string)
|
||||
|
Loading…
x
Reference in New Issue
Block a user