mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
[issue-6860] fix NPE of Could not generate api (#6868)
This commit is contained in:
parent
39a9c5587f
commit
92a1c3a449
@ -2886,7 +2886,7 @@ public class DefaultCodegen {
|
|||||||
* @return true if the library/module/package of the corresponding type needs to be imported
|
* @return true if the library/module/package of the corresponding type needs to be imported
|
||||||
*/
|
*/
|
||||||
protected boolean needToImport(String type) {
|
protected boolean needToImport(String type) {
|
||||||
return !defaultIncludes.contains(type)
|
return StringUtils.isNotBlank(type) && !defaultIncludes.contains(type)
|
||||||
&& !languageSpecificPrimitives.contains(type);
|
&& !languageSpecificPrimitives.contains(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user