Skip to content

Commit bc4c02e

Browse files
authored
Upgrade to OpenAPI 6.0.1 (#83)
Moves to Kotlin and Java 11, feature parity with 5.x branch.
1 parent 88c446f commit bc4c02e

File tree

14 files changed

+4533
-822
lines changed

14 files changed

+4533
-822
lines changed

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ To use it, do something like this:
2323
<plugin>
2424
<groupId>org.openapitools</groupId>
2525
<artifactId>openapi-generator-maven-plugin</artifactId>
26-
<version>5.2.1</version>
26+
<version>6.0.1</version>
2727
<dependencies>
2828
<dependency>
2929
<groupId>com.bluetrainsoftware.maven</groupId>
3030
<artifactId>openapi-dart-generator</artifactId>
31-
<version>5.12</version>
31+
<version>6.1</version>
3232
</dependency>
3333
</dependencies>
3434
<executions>
@@ -395,7 +395,7 @@ mvn clean verify
395395
The source for the tests is located in src/k8s** folders. The generated test output will be in target/it/k8s**.
396396

397397
==== Changelog
398-
398+
- 6.1 - migrate to the *6.0.1* version of OpenAPI, move to Java 11, swap to Kotlin. This is advertised as a breaking change and has led to some classes changing their names, adding new classes which didn't exist before.
399399
- 5.13 - ability to disable the copyWith generation (see above)
400400
- 5.12 - contributed fixes for inherited types (via https://github.com/roald-di)
401401
- 5.11 - fix date/datetime strings in queries to not be encoded. Updated to use 5.2.1 of OpenAPI. Fixed a bunch

pom.xml

Lines changed: 149 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<artifactId>openapi-dart-generator</artifactId>
55
<packaging>jar</packaging>
66
<name>openapi-dart-generator</name>
7-
<version>5.15-SNAPSHOT</version>
7+
<version>6.1-SNAPSHOT</version>
88

99
<description>
1010
dart2 generator from openapi 3.x spec files. Changing to openapitools dependencies.
@@ -34,9 +34,9 @@
3434
</scm>
3535

3636
<properties>
37-
<openapi-codegen-version>5.2.1</openapi-codegen-version>
38-
<maven.compiler.target>1.8</maven.compiler.target>
39-
<maven.compiler.source>1.8</maven.compiler.source>
37+
<openapi-codegen-version>6.0.1</openapi-codegen-version>
38+
<maven.compiler.target>1.11</maven.compiler.target>
39+
<maven.compiler.source>1.11</maven.compiler.source>
4040
</properties>
4141

4242
<prerequisites>
@@ -63,6 +63,25 @@
6363
<scope>provided</scope>
6464
</dependency>
6565

66+
<!-- because we are using kotlin now, lets use their annotations -->
67+
<dependency>
68+
<groupId>org.jetbrains</groupId>
69+
<artifactId>annotations</artifactId>
70+
<version>23.0.0</version>
71+
</dependency>
72+
73+
<dependency>
74+
<groupId>org.jetbrains.kotlin</groupId>
75+
<artifactId>kotlin-stdlib-jdk8</artifactId>
76+
<version>[1.7.10]</version>
77+
</dependency>
78+
79+
<dependency>
80+
<groupId>org.jetbrains.kotlin</groupId>
81+
<artifactId>kotlin-reflect</artifactId>
82+
<version>[1.7.10]</version>
83+
</dependency>
84+
6685
<dependency>
6786
<groupId>junit</groupId>
6887
<artifactId>junit</artifactId>
@@ -73,19 +92,132 @@
7392

7493
<build>
7594
<plugins>
76-
<plugin>
77-
<groupId>io.repaint.maven</groupId>
78-
<artifactId>tiles-maven-plugin</artifactId>
79-
<version>2.17</version>
80-
<extensions>true</extensions>
81-
<configuration>
82-
<filtering>false</filtering>
83-
<tiles>
84-
<!-- its a good tile -->
85-
<tile>cd.connect.tiles:tile-java:[1.3, 2)</tile>
86-
</tiles>
87-
</configuration>
88-
</plugin>
95+
<plugin>
96+
<groupId>io.repaint.maven</groupId>
97+
<artifactId>tiles-maven-plugin</artifactId>
98+
<version>2.23</version>
99+
<extensions>true</extensions>
100+
<configuration>
101+
<filtering>false</filtering>
102+
<tiles>
103+
<tile>cd.connect.tiles:tile-release:[1.2, 2)</tile>
104+
</tiles>
105+
</configuration>
106+
</plugin>
107+
<plugin>
108+
<!-- if including source jars, use the no-fork goals
109+
otherwise both the Groovy sources and Java stub sources
110+
will get included in your jar -->
111+
<groupId>org.apache.maven.plugins</groupId>
112+
<artifactId>maven-source-plugin</artifactId>
113+
<!-- source plugin \> = 2.1 is required to use the no-fork goals -->
114+
<version>3.0.0</version>
115+
<executions>
116+
<execution>
117+
<id>attach-sources</id>
118+
<goals>
119+
<goal>jar-no-fork</goal>
120+
</goals>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
<plugin>
125+
<groupId>org.jetbrains.kotlin</groupId>
126+
<artifactId>kotlin-maven-plugin</artifactId>
127+
<version>1.7.10</version>
128+
<executions>
129+
<execution>
130+
<id>compile</id>
131+
<goals>
132+
<goal>compile</goal>
133+
</goals>
134+
<configuration>
135+
<sourceDirs>
136+
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
137+
<sourceDir>${project.basedir}/src/main/java</sourceDir>
138+
<jvmTarget>11</jvmTarget>
139+
</sourceDirs>
140+
</configuration>
141+
</execution>
142+
<execution>
143+
<id>test-compile</id>
144+
<goals> <goal>test-compile</goal> </goals>
145+
<configuration>
146+
<sourceDirs>
147+
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
148+
<sourceDir>${project.basedir}/src/test/java</sourceDir>
149+
<jvmTarget>11</jvmTarget>
150+
</sourceDirs>
151+
</configuration>
152+
</execution>
153+
</executions>
154+
</plugin>
155+
<plugin>
156+
<artifactId>maven-compiler-plugin</artifactId>
157+
<version>3.8.1</version>
158+
<configuration>
159+
<release>11</release>
160+
<source>11</source>
161+
<target>11</target>
162+
<executable>javac11</executable>
163+
<useIncrementalCompilation>false</useIncrementalCompilation>
164+
</configuration>
165+
<executions>
166+
<!-- Replacing default-compile as it is treated specially by maven -->
167+
<execution>
168+
<id>default-compile</id>
169+
<phase>none</phase>
170+
<configuration/>
171+
</execution>
172+
<!-- Replacing default-testCompile as it is treated specially by maven -->
173+
<execution>
174+
<id>default-testCompile</id>
175+
<phase>none</phase>
176+
<configuration/>
177+
</execution>
178+
<execution>
179+
<id>java-compile</id>
180+
<phase>compile</phase>
181+
<goals>
182+
<goal>compile</goal>
183+
</goals>
184+
<configuration />
185+
</execution>
186+
<execution>
187+
<id>java-test-compile</id>
188+
<phase>test-compile</phase>
189+
<goals>
190+
<goal>testCompile</goal>
191+
</goals>
192+
<configuration />
193+
</execution>
194+
</executions>
195+
</plugin>
196+
<!-- files ending in spec or test -->
197+
<plugin>
198+
<groupId>org.apache.maven.plugins</groupId>
199+
<artifactId>maven-surefire-plugin</artifactId>
200+
<version>3.0.0-M3</version>
201+
<configuration>
202+
<includes>
203+
<include>**/*Test.java</include>
204+
</includes>
205+
</configuration>
206+
</plugin>
207+
<!-- ensure we know what our licenses are -->
208+
<plugin>
209+
<groupId>org.codehaus.mojo</groupId>
210+
<artifactId>license-maven-plugin</artifactId>
211+
<version>2.0.0</version>
212+
<executions>
213+
<execution>
214+
<id>licences</id>
215+
<goals>
216+
<goal>add-third-party</goal>
217+
</goals>
218+
</execution>
219+
</executions>
220+
</plugin>
89221
<plugin>
90222
<groupId>org.apache.maven.plugins</groupId>
91223
<artifactId>maven-invoker-plugin</artifactId>

src/it/k8s/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<plugin>
5252
<groupId>org.openapitools</groupId>
5353
<artifactId>openapi-generator-maven-plugin</artifactId>
54-
<version>5.2.1</version>
54+
<version>6.0.1</version>
5555
<dependencies>
5656
<dependency>
5757
<groupId>com.bluetrainsoftware.maven</groupId>

src/it/k8s_null/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<plugin>
5252
<groupId>org.openapitools</groupId>
5353
<artifactId>openapi-generator-maven-plugin</artifactId>
54-
<version>5.2.1</version>
54+
<version>6.0.1</version>
5555
<dependencies>
5656
<dependency>
5757
<groupId>com.bluetrainsoftware.maven</groupId>

0 commit comments

Comments
 (0)