File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
main/java/org/couchbase/quickstart/springboot
test/java/org/couchbase/quickstart/springboot/controllers Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 2222 <maven .compiler.target>8</maven .compiler.target>
2323 <swagger .version>3.0.0</swagger .version>
2424 <springweb .version>3.0.0</springweb .version>
25- <couchbase .version>3.3.0 </couchbase .version>
25+ <couchbase .version>3.5.2 </couchbase .version>
2626 <junit .version>4.13.2</junit .version>
2727 <mavensurefire .version>3.0.0-M5</mavensurefire .version>
2828 </properties >
6767 <artifactId >springfox-spring-web</artifactId >
6868 <version >${springweb.version} </version >
6969 </dependency >
70- <dependency >
70+ <!-- < dependency>
7171 <groupId>io.springfox</groupId>
7272 <artifactId>springfox-swagger2</artifactId>
7373 <version>${swagger.version}</version>
7474 <scope>compile</scope>
75- </dependency >
75+ </dependency> -->
7676 <dependency >
7777 <groupId >io.springfox</groupId >
7878 <artifactId >springfox-swagger-ui</artifactId >
Original file line number Diff line number Diff line change 1111import springfox .documentation .service .Contact ;
1212import springfox .documentation .spi .DocumentationType ;
1313import springfox .documentation .spring .web .plugins .Docket ;
14- import springfox .documentation .swagger2 .annotations .EnableSwagger2 ;
1514
1615
1716@ Configuration
18- @ EnableSwagger2
1917public class Swagger {
2018
2119 @ Bean
2220 public Docket api () {
23- return new Docket (DocumentationType .SWAGGER_2 )
21+ return new Docket (DocumentationType .OAS_30 )
2422 .select ()
2523 .apis (RequestHandlerSelectors .basePackage (
2624 "org.couchbase.quickstart.springboot.controllers" ))
Original file line number Diff line number Diff line change 11package org .couchbase .quickstart .springboot .controllers ;
22
33import java .util .List ;
4+ import java .util .stream .Collectors ;
45
56import javax .validation .Valid ;
67
@@ -127,7 +128,7 @@ public ResponseEntity<List<Airport>> listAirports() {
127128 public ResponseEntity <List <String >> listDirectConnections (@ PathVariable String airportCode ) {
128129 try {
129130 List <String > destinationAirports = airportService .listDirectConnections (airportCode ).stream ()
130- .map (Route ::getDestinationairport ).toList ();
131+ .map (Route ::getDestinationairport ).collect ( Collectors . toList () );
131132 return new ResponseEntity <>(destinationAirports , HttpStatus .OK );
132133 } catch (Exception e ) {
133134 log .error (INTERNAL_SERVER_ERROR + ": " + e .getMessage ());
Original file line number Diff line number Diff line change 77
88import org .couchbase .quickstart .springboot .models .Airport ;
99import org .couchbase .quickstart .springboot .models .Airport .Geo ;
10- import org .couchbase .quickstart .springboot .models .Route ;
1110import org .junit .jupiter .api .AfterEach ;
1211import org .junit .jupiter .api .BeforeEach ;
1312import org .junit .jupiter .api .Test ;
2019import org .springframework .http .HttpStatus ;
2120import org .springframework .http .ResponseEntity ;
2221
23- import com .couchbase .client .java .query .QueryOptions ;
24- import com .couchbase .client .java .query .QueryScanConsistency ;
25-
2622@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT )
2723class AirportIntegrationTest {
2824
You can’t perform that action at this time.
0 commit comments