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) {
270270 buildOpenAPIWithOpenAPIDefinition (calculatedOpenAPI , apiDef .get (), locale );
271271 }
272272 // Set default info
273- else if (calculatedOpenAPI .getInfo () == null ) {
273+ else if (calculatedOpenAPI != null && calculatedOpenAPI .getInfo () == null ) {
274274 Info infos = new Info ().title (DEFAULT_TITLE ).version (DEFAULT_VERSION );
275275 calculatedOpenAPI .setInfo (infos );
276276 }
@@ -282,7 +282,8 @@ else if (calculatedOpenAPI.getInfo() == null) {
282282 initializeHiddenRestController ();
283283
284284 // add security schemes
285- this .calculateSecuritySchemes (calculatedOpenAPI .getComponents (), locale );
285+ if (calculatedOpenAPI != null )
286+ this .calculateSecuritySchemes (calculatedOpenAPI .getComponents (), locale );
286287 openApiBuilderCustomisers .ifPresent (customizers -> customizers .forEach (customiser -> customiser .customise (this )));
287288 return calculatedOpenAPI ;
288289 }
You can’t perform that action at this time.
0 commit comments