Skip to content

Commit

Permalink
Revert "NOISSUE: Simplified test project to not use Spring"
Browse files Browse the repository at this point in the history
This reverts commit b4082bc.
  • Loading branch information
danielflower committed Dec 21, 2024
1 parent b36b492 commit 0179c2a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 29 deletions.
7 changes: 7 additions & 0 deletions test-projects/openapi-spec-as-plugin-dependency/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>

<groupId>com.github.danielflower.mavenplugins.testprojects.openapi-spec-as-plugin-dependency</groupId>
<artifactId>openapi-spec-as-plugin-dependency-aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>2.2.20</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
Expand All @@ -41,21 +45,6 @@
<artifactId>jackson-databind-nullable</artifactId>
<version>0.2.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.18.1</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.18.1</version>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -88,17 +77,23 @@
</goals>
<configuration>
<inputSpec>openapi-spec.yaml</inputSpec>
<generatorName>java</generatorName>
<library>native</library>
<generatorName>spring</generatorName>
<apiPackage>com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.api</apiPackage>
<modelPackage>com.github.danielflower.mavenplugins.tesetprojects.openapispecasplugindependency.facade.openapi.model</modelPackage>
<generateSupportingFiles>false</generateSupportingFiles>
<verbose>false</verbose>
<configHelp>false</configHelp>
<configOptions>
<annotationLibrary>none</annotationLibrary>
<useSpringBoot3>true</useSpringBoot3>
<dateLibrary>java8</dateLibrary>
<useBeanValidation>false</useBeanValidation>
<generateBuilders>false</generateBuilders>
<interfaceOnly>true</interfaceOnly>
<skipDefaultInterface>true</skipDefaultInterface>
<useBeanValidation>true</useBeanValidation>
<generateBuilders>true</generateBuilders>
<useEnumCaseInsensitive>true</useEnumCaseInsensitive>
<implicitHeaders>true</implicitHeaders>
<useTags>true</useTags>
<idea>true</idea>
</configOptions>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<PingResult> ping() {
var result = new PingResult(OffsetDateTime.now());
return ResponseEntity.ok(result);
}


}

0 comments on commit 0179c2a

Please sign in to comment.