forked from loafle/openapi-generator-original
cleaned up toApiName to strip bad chars
This commit is contained in:
parent
28221b5f5a
commit
95d77807c2
@ -38,7 +38,10 @@ trait PathUtil {
|
||||
}
|
||||
|
||||
def toApiName(name: String) = {
|
||||
name.charAt(0).toUpperCase + name.substring(1) + "Api"
|
||||
name.replaceAll("\\{","").replaceAll("\\}", "") match {
|
||||
case s: String if(s.length > 0) => s.charAt(0).toUpperCase + s.substring(1) + "Api"
|
||||
case _ => "Api"
|
||||
}
|
||||
}
|
||||
|
||||
def nameFromPath(apiPath: String) = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user