mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-24 03:19:07 +00:00
Use partial for Ruby HTTP libraries (#3539)
* use partial for ruby http libraries * fix isFaraday * add back client side validation switch * remove blank lines
This commit is contained in:
@@ -233,14 +233,14 @@ public class RubyClientCodegen extends AbstractRubyCodegen {
|
||||
supportingFiles.add(new SupportingFile("rubocop.mustache", "", ".rubocop.yml"));
|
||||
supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml"));
|
||||
supportingFiles.add(new SupportingFile("gemspec.mustache", "", gemName + ".gemspec"));
|
||||
supportingFiles.add(new SupportingFile("configuration.mustache", gemFolder, "configuration.rb"));
|
||||
|
||||
if (TYPHOEUS.equals(getLibrary())) {
|
||||
supportingFiles.add(new SupportingFile("api_client.mustache", gemFolder, "api_client.rb"));
|
||||
supportingFiles.add(new SupportingFile("configuration.mustache", gemFolder, "configuration.rb"));
|
||||
supportingFiles.add(new SupportingFile("Gemfile.lock.mustache", "", "Gemfile.lock"));
|
||||
} else if (FARADAY.equals(getLibrary())) {
|
||||
supportingFiles.add(new SupportingFile("faraday_api_client.mustache", gemFolder, "api_client.rb"));
|
||||
supportingFiles.add(new SupportingFile("faraday_configuration.mustache", gemFolder, "configuration.rb"));
|
||||
additionalProperties.put("isFaraday", Boolean.TRUE);
|
||||
} else {
|
||||
throw new RuntimeException("Invalid HTTP library " + getLibrary() + ". Only faraday, typhoeus are supported.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user