File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/JavaSpring Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{ {^reactive} }
2+ int statusCode = { {#responses} }{ {#-first} }{ {{code} }}{ {/-first} }{ {/responses} };
23{ {#examples} }
34 { {#-first} }
45 { {#jdk8} }
@@ -16,7 +17,7 @@ return CompletableFuture.supplyAsync(()-> {
1617 { {#jdk8} }
1718{ {#async} } { {/async} } });
1819 { {/jdk8} }
19- { {#async} } { {/async} } return new ResponseEntity<> (HttpStatus.NOT_IMPLEMENTED );
20+ { {#async} } { {/async} } return new ResponseEntity<> (HttpStatus.valueOf(statusCode) );
2021 { {#jdk8} }
2122 { {#async} }
2223 }, Runnable::run);
@@ -25,11 +26,11 @@ return CompletableFuture.supplyAsync(()-> {
2526 { {/-last} }
2627{ {/examples} }
2728{ {^examples} }
28- return { {#jdk8} }{ {#async} }CompletableFuture.completedFuture({ {/async} }{ {/jdk8} }new ResponseEntity<> (HttpStatus.NOT_IMPLEMENTED ){ {#jdk8} }{ {#async} }){ {/async} }{ {/jdk8} };
29+ return { {#jdk8} }{ {#async} }CompletableFuture.completedFuture({ {/async} }{ {/jdk8} }new ResponseEntity<> (HttpStatus.valueOf(statusCode) ){ {#jdk8} }{ {#async} }){ {/async} }{ {/jdk8} };
2930{ {/examples} }
3031{ {/reactive} }
3132{ {#reactive} }
32- exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED );
33+ exchange.getResponse().setStatusCode(HttpStatus.valueOf(statusCode) );
3334 Mono<Void > result = Mono.empty();
3435 { {#examples} }
3536 { {#-first} }
You can’t perform that action at this time.
0 commit comments