Skip to content

Commit 413373e

Browse files
author
bnasslahsen
committed
APIResponses constructed programmatically are not correctly analyzed. Fixes #758
1 parent a645ccc commit 413373e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,12 @@ protected synchronized OpenAPI getOpenApi() {
263263
openAPIBuilder.setServersPresent(true);
264264
openAPIBuilder.updateServers(openApi);
265265

266+
if (springDocConfigProperties.isRemoveBrokenReferenceDefinitions())
267+
this.removeBrokenReferenceDefinitions(openApi);
268+
266269
// run the optional customisers
267270
openApiCustomisers.ifPresent(apiCustomisers -> apiCustomisers.forEach(openApiCustomiser -> openApiCustomiser.customise(openApi)));
268271

269-
if (springDocConfigProperties.isRemoveBrokenReferenceDefinitions())
270-
this.removeBrokenReferenceDefinitions(openApi);
271272
openAPIBuilder.setCachedOpenAPI(openApi);
272273
openAPIBuilder.resetCalculatedOpenAPI();
273274

springdoc-openapi-webmvc-core/src/test/java/test/org/springdoc/api/app126/SpringDocApp126Test.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
/**
4343
* Tests Spring meta-annotations as method parameters
4444
*/
45-
@TestPropertySource(properties = "springdoc.remove-broken-reference-definitions=false")
4645
public class SpringDocApp126Test extends AbstractSpringDocTest {
4746

4847
@SpringBootApplication

0 commit comments

Comments
 (0)