File tree Expand file tree Collapse file tree 3 files changed +58
-1
lines changed
springdoc-openapi-starter-common/src/main/java/org/springdoc/core/configuration
springdoc-openapi-starter-webmvc-api/src/test
java/test/org/springdoc/api/v31/app129 Expand file tree Collapse file tree 3 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 3434import java .util .Map ;
3535import java .util .Optional ;
3636import java .util .Set ;
37+ import java .util .concurrent .Future ;
3738
3839import com .fasterxml .jackson .databind .node .ObjectNode ;
3940import com .querydsl .core .types .Predicate ;
@@ -153,7 +154,8 @@ public class SpringDocConfiguration {
153154 static {
154155 getConfig ().replaceWithSchema (ObjectNode .class , new ObjectSchema ())
155156 .replaceWithClass (Charset .class , String .class )
156- .addResponseWrapperToIgnore (DeferredResult .class );
157+ .addResponseWrapperToIgnore (DeferredResult .class )
158+ .addResponseWrapperToIgnore (Future .class );
157159 }
158160
159161 /**
Original file line number Diff line number Diff line change 2424
2525package test .org .springdoc .api .v31 .app129 ;
2626
27+ import java .util .concurrent .CompletableFuture ;
28+
2729import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
2830import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
2931
@@ -43,4 +45,11 @@ public DeferredResult<OperationResponse<ActualReturnedEntity>> update(
4345 @ RequestBody ActualReturnedEntity entity ) throws Exception {
4446 return null ;
4547 }
48+
49+ @ PostMapping ("/test2" )
50+ @ ApiResponses ({ @ ApiResponse (responseCode = "200" ) })
51+ public CompletableFuture <OperationResponse <ActualReturnedEntity >> update2 (
52+ @ RequestBody ActualReturnedEntity entity ) throws Exception {
53+ return null ;
54+ }
4655}
Original file line number Diff line number Diff line change 5656 }
5757 }
5858 }
59+ },
60+ "/api/test2" : {
61+ "post" : {
62+ "tags" : [
63+ " hello-controller"
64+ ],
65+ "operationId" : " update2" ,
66+ "parameters" : [
67+ {
68+ "name" : " userId" ,
69+ "in" : " header" ,
70+ "schema" : {
71+ "type" : " string"
72+ }
73+ },
74+ {
75+ "name" : " registrationId" ,
76+ "in" : " header" ,
77+ "schema" : {
78+ "type" : " string"
79+ }
80+ }
81+ ],
82+ "requestBody" : {
83+ "content" : {
84+ "application/json" : {
85+ "schema" : {
86+ "$ref" : " #/components/schemas/ActualReturnedEntity"
87+ }
88+ }
89+ },
90+ "required" : true
91+ },
92+ "responses" : {
93+ "200" : {
94+ "description" : " OK" ,
95+ "content" : {
96+ "*/*" : {
97+ "schema" : {
98+ "$ref" : " #/components/schemas/OperationResponseActualReturnedEntity"
99+ }
100+ }
101+ }
102+ }
103+ }
104+ }
59105 }
60106 },
61107 "components" : {
You can’t perform that action at this time.
0 commit comments