Skip to content

Commit f954490

Browse files
committed
Adjust codestarts
1 parent 297a2d4 commit f954490

File tree

5 files changed

+57
-62
lines changed

5 files changed

+57
-62
lines changed

server/integration-tests/runtime/pom.xml renamed to server/integration-tests/codestarts/pom.xml

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<parent>
45
<artifactId>quarkus-openapi-generator-server-integration-tests-parent</artifactId>
56
<groupId>io.quarkiverse.openapi.generator</groupId>
@@ -8,40 +9,19 @@
89
</parent>
910
<modelVersion>4.0.0</modelVersion>
1011

11-
<artifactId>quarkus-openapi-generator-server-integration-tests-runtime</artifactId>
12-
<name>Quarkus - Openapi Generator - Server - Integration Tests - Runtime</name>
12+
<artifactId>quarkus-openapi-generator-server-integration-tests-codestarts</artifactId>
13+
<name>Quarkus - Openapi Generator - Server - Integration Tests - Codestarts</name>
1314

1415
<dependencies>
1516
<dependency>
16-
<groupId>org.junit.jupiter</groupId>
17-
<artifactId>junit-jupiter-api</artifactId>
18-
<scope>test</scope>
17+
<groupId>io.quarkiverse.openapi.generator</groupId>
18+
<artifactId>quarkus-openapi-generator-server</artifactId>
1919
</dependency>
2020
<dependency>
2121
<groupId>io.quarkus</groupId>
2222
<artifactId>quarkus-devtools-testing</artifactId>
2323
<scope>test</scope>
2424
</dependency>
25-
<dependency>
26-
<groupId>io.quarkus</groupId>
27-
<artifactId>quarkus-junit5</artifactId>
28-
<scope>test</scope>
29-
</dependency>
30-
<dependency>
31-
<groupId>io.quarkus</groupId>
32-
<artifactId>quarkus-test-common</artifactId>
33-
<scope>test</scope>
34-
</dependency>
35-
<dependency>
36-
<groupId>org.junit.jupiter</groupId>
37-
<artifactId>junit-jupiter</artifactId>
38-
<scope>test</scope>
39-
</dependency>
40-
<dependency>
41-
<groupId>io.rest-assured</groupId>
42-
<artifactId>rest-assured</artifactId>
43-
<scope>test</scope>
44-
</dependency>
4525
</dependencies>
4626

4727
<build>
@@ -86,6 +66,31 @@
8666
</plugins>
8767
</pluginManagement>
8868
<plugins>
69+
<plugin>
70+
<groupId>org.apache.maven.plugins</groupId>
71+
<artifactId>maven-resources-plugin</artifactId>
72+
<version>3.3.1</version> <!-- Adjust the version if needed -->
73+
<executions>
74+
<execution>
75+
<id>copy-resources</id>
76+
<phase>generate-resources</phase>
77+
<goals>
78+
<goal>copy-resources</goal>
79+
</goals>
80+
<configuration>
81+
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
82+
<resources>
83+
<resource>
84+
<directory>
85+
${project.basedir}/../runtime/src/main/codestarts/quarkus/openapi-generator-codestart/java
86+
</directory>
87+
<filtering>false</filtering>
88+
</resource>
89+
</resources>
90+
</configuration>
91+
</execution>
92+
</executions>
93+
</plugin>
8994
<plugin>
9095
<groupId>io.quarkus</groupId>
9196
<artifactId>quarkus-maven-plugin</artifactId>
@@ -100,5 +105,4 @@
100105
</plugin>
101106
</plugins>
102107
</build>
103-
104-
</project>
108+
</project>

server/integration-tests/codestarts/src/main/resources/application.properties

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.quarkiverse.openapi.server.generator.it;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.junit.jupiter.api.extension.RegisterExtension;
5+
6+
import io.quarkus.devtools.codestarts.quarkus.QuarkusCodestartCatalog;
7+
import io.quarkus.devtools.testing.codestarts.QuarkusCodestartTest;
8+
9+
public class QuarkusOpenAPIGeneratorServerCodestartsTest {
10+
11+
@RegisterExtension
12+
public static QuarkusCodestartTest codestartTest = QuarkusCodestartTest.builder()
13+
.languages(QuarkusCodestartCatalog.Language.JAVA)
14+
.setupStandaloneExtensionTest("io.quarkiverse.openapi.generator:quarkus-openapi-generator-server").build();
15+
16+
@Test
17+
void testContent() throws Throwable {
18+
codestartTest
19+
.assertThatGeneratedFile(QuarkusCodestartCatalog.Language.JAVA, "src/main/resources/application.properties")
20+
.content()
21+
.contains("quarkus.openapi.generator.spec=openapi_yml");
22+
}
23+
}

server/integration-tests/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<modules>
1717
<module>reactive</module>
1818
<module>resteasy</module>
19-
<module>runtime</module>
19+
<module>codestarts</module>
2020
</modules>
2121

22-
</project>
22+
</project>

server/integration-tests/runtime/src/test/java/io/quarkiverse/openapi/generator/ServerCodeStartTest.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)