From 0179c2a9f609465604b24cbe9b386b95616cc64a Mon Sep 17 00:00:00 2001 From: Daniel Flower Date: Sat, 21 Dec 2024 14:07:02 +0800 Subject: [PATCH] Revert "NOISSUE: Simplified test project to not use Spring" This reverts commit b4082bc1393bbd69cf2cb2d37951fbc06fd26011. --- .../openapi-spec-as-plugin-dependency/pom.xml | 7 ++++ .../the-service-impl/pom.xml | 41 ++++++++----------- .../OpenApiController.java | 16 +++++--- 3 files changed, 35 insertions(+), 29 deletions(-) diff --git a/test-projects/openapi-spec-as-plugin-dependency/pom.xml b/test-projects/openapi-spec-as-plugin-dependency/pom.xml index 6b45a978..b55187ce 100644 --- a/test-projects/openapi-spec-as-plugin-dependency/pom.xml +++ b/test-projects/openapi-spec-as-plugin-dependency/pom.xml @@ -5,6 +5,13 @@ 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.3.4 + + + com.github.danielflower.mavenplugins.testprojects.openapi-spec-as-plugin-dependency openapi-spec-as-plugin-dependency-aggregator 1.0-SNAPSHOT diff --git a/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/pom.xml b/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/pom.xml index e18e1ac0..99fafe31 100644 --- a/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/pom.xml +++ b/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/pom.xml @@ -27,9 +27,13 @@ 1.0-SNAPSHOT - javax.annotation - javax.annotation-api - 1.3.2 + org.springframework.boot + spring-boot-starter-web + + + io.swagger.core.v3 + swagger-annotations + 2.2.20 jakarta.validation @@ -41,21 +45,6 @@ jackson-databind-nullable 0.2.6 - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - 2.18.1 - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - 2.18.1 - - - com.google.code.findbugs - jsr305 - 3.0.2 - @@ -88,17 +77,23 @@ openapi-spec.yaml - java - native + spring com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.api com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.model + false false false - none + true java8 - false - false + true + true + true + true + true + true + true + true diff --git a/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/src/main/java/com/github/danielflower/mavenplugins/testprojects/openapispecasplugindependency/OpenApiController.java b/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/src/main/java/com/github/danielflower/mavenplugins/testprojects/openapispecasplugindependency/OpenApiController.java index 0a27007b..b9d05e2e 100644 --- a/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/src/main/java/com/github/danielflower/mavenplugins/testprojects/openapispecasplugindependency/OpenApiController.java +++ b/test-projects/openapi-spec-as-plugin-dependency/the-service-impl/src/main/java/com/github/danielflower/mavenplugins/testprojects/openapispecasplugindependency/OpenApiController.java @@ -2,15 +2,19 @@ import com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.api.PingApi; import com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.model.PingResult; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.time.OffsetDateTime; +import org.springframework.http.ResponseEntity; -public class OpenApiController { +@RestController +@RequestMapping("/api") +public class OpenApiController implements PingApi { - - public static void main(String[] args) { - // Not really a controller, but at least it uses the classes PingResult - PingResult x = new PingResult(); + @Override + public ResponseEntity ping() { + var result = new PingResult(OffsetDateTime.now()); + return ResponseEntity.ok(result); } - }