You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the swagger json contains headers with -, the java codegen takes the header name as is, and uses it as a local variable name. This creates non-functional code.
Suggested fix is to have a 'codeParamName' paired with 'paramName', and map - to _
overridedeftoVarName(name: String):String= {
name match {
case _ if (reservedWords.contains(name)) => escapeReservedWord(name)
case _ => name.replace("-", "_")
}
}
then I think messing with the api.mustache gets the rest of the way - note baseName vs paramName
When the swagger json contains headers with -, the java codegen takes the header name as is, and uses it as a local variable name. This creates non-functional code.
Suggested fix is to have a 'codeParamName' paired with 'paramName', and map - to _
Generated code: note "String Accept-Language" which won't work.
The text was updated successfully, but these errors were encountered: