File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/service Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -270,7 +270,7 @@ public OpenAPI build(Locale locale) {
270
270
buildOpenAPIWithOpenAPIDefinition (calculatedOpenAPI , apiDef .get (), locale );
271
271
}
272
272
// Set default info
273
- else if (calculatedOpenAPI .getInfo () == null ) {
273
+ else if (calculatedOpenAPI != null && calculatedOpenAPI .getInfo () == null ) {
274
274
Info infos = new Info ().title (DEFAULT_TITLE ).version (DEFAULT_VERSION );
275
275
calculatedOpenAPI .setInfo (infos );
276
276
}
@@ -282,7 +282,8 @@ else if (calculatedOpenAPI.getInfo() == null) {
282
282
initializeHiddenRestController ();
283
283
284
284
// add security schemes
285
- this .calculateSecuritySchemes (calculatedOpenAPI .getComponents (), locale );
285
+ if (calculatedOpenAPI != null )
286
+ this .calculateSecuritySchemes (calculatedOpenAPI .getComponents (), locale );
286
287
openApiBuilderCustomisers .ifPresent (customizers -> customizers .forEach (customiser -> customiser .customise (this )));
287
288
return calculatedOpenAPI ;
288
289
}
You can’t perform that action at this time.
0 commit comments