Skip to content

Commit a645ccc

Browse files
author
bnasslahsen
committed
fixes #757
1 parent 96547c0 commit a645ccc

File tree

7 files changed

+746
-2
lines changed

7 files changed

+746
-2
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,16 +259,18 @@ protected synchronized OpenAPI getOpenApi() {
259259
responseBuilder.buildGenericResponse(openApi.getComponents(), findControllerAdvice);
260260
}
261261
getPaths(mappingsMap);
262-
// run the optional customisers
263-
openApiCustomisers.ifPresent(apiCustomisers -> apiCustomisers.forEach(openApiCustomiser -> openApiCustomiser.customise(openApi)));
264262
if (!CollectionUtils.isEmpty(openApi.getServers()))
265263
openAPIBuilder.setServersPresent(true);
266264
openAPIBuilder.updateServers(openApi);
267265

266+
// run the optional customisers
267+
openApiCustomisers.ifPresent(apiCustomisers -> apiCustomisers.forEach(openApiCustomiser -> openApiCustomiser.customise(openApi)));
268+
268269
if (springDocConfigProperties.isRemoveBrokenReferenceDefinitions())
269270
this.removeBrokenReferenceDefinitions(openApi);
270271
openAPIBuilder.setCachedOpenAPI(openApi);
271272
openAPIBuilder.resetCalculatedOpenAPI();
273+
272274
LOGGER.info("Init duration for springdoc-openapi is: {} ms",
273275
Duration.between(start, Instant.now()).toMillis());
274276
}

0 commit comments

Comments
 (0)