From 7956ccc979c18ba49f00e927de2fe6601bda8376 Mon Sep 17 00:00:00 2001 From: Duane Johnson Date: Wed, 18 Sep 2013 15:47:41 -0600 Subject: [PATCH] Add an 'httpMethodLowerCase' property Some libraries use lower case httpMethod names for method calls. For example, Ruby's Faraday library uses 'get', 'put', 'post', 'delete'. Rather than this unweildy Ruby code produced by a mustache template: self.send("GET".downcase, path, request_opts) This patch would allow for a more tidy output such as: get(path, request_opts) --- src/main/scala/com/wordnik/swagger/codegen/Codegen.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/com/wordnik/swagger/codegen/Codegen.scala b/src/main/scala/com/wordnik/swagger/codegen/Codegen.scala index 818790cf2e1..d85dee82838 100644 --- a/src/main/scala/com/wordnik/swagger/codegen/Codegen.scala +++ b/src/main/scala/com/wordnik/swagger/codegen/Codegen.scala @@ -362,6 +362,7 @@ class Codegen(config: CodegenConfig) { "requiredParams" -> requiredParams.toList, "errorList" -> errorList, "httpMethod" -> operation.method.toUpperCase, + "httpMethodLowerCase" -> operation.method.toLowerCase, operation.method.toLowerCase -> "true") if (requiredParams.size > 0) properties += "requiredParamCount" -> requiredParams.size.toString operation.responseClass.indexOf("[") match {