Skip to content

Commit 26458dd

Browse files
author
bnasslahsen
committed
improver server url management
1 parent 7f3862b commit 26458dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ protected synchronized OpenAPI getOpenApi() {
276276
Duration.between(start, Instant.now()).toMillis());
277277
}
278278
else {
279+
if (!CollectionUtils.isEmpty(openAPIBuilder.getCachedOpenAPI().getServers()))
280+
openAPIBuilder.setServersPresent(true);
279281
openApi = openAPIBuilder.updateServers(openAPIBuilder.getCachedOpenAPI());
280282
}
281283
return openApi;

springdoc-openapi-kotlin/src/test/kotlin/test/org/springdoc/api/app4/HelloController.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ data class Person(
3232
@RequestMapping("/test")
3333
class HelloController {
3434
@GetMapping
35-
suspend fun index(s: Person) = Person("name", "nickname")
36-
35+
suspend fun index(s: Person) = s
3736

3837
}

0 commit comments

Comments
 (0)