forked from loafle/openapi-generator-original
Allow null title, as in Kubernetes Swagger Spec
This commit is contained in:
parent
512e51777d
commit
569d458bc9
@ -181,10 +181,14 @@ public class HaskellServantCodegen extends DefaultCodegen implements CodegenConf
|
||||
String title = swagger.getInfo().getTitle();
|
||||
|
||||
// Drop any API suffix
|
||||
if(title == null) {
|
||||
title = "Swagger";
|
||||
} else {
|
||||
title = title.trim();
|
||||
if (title.toUpperCase().endsWith("API")) {
|
||||
title = title.substring(0, title.length() - 3);
|
||||
}
|
||||
}
|
||||
|
||||
String[] words = title.split(" ");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user