mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
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)
This commit is contained in:
parent
13bc111bd6
commit
7956ccc979
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user