1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <parent >
8
+ <groupId >nl.kritsel</groupId >
9
+ <artifactId >tado-api-demo-java</artifactId >
10
+ <version >1.0-SNAPSHOT</version >
11
+ </parent >
12
+
13
+ <artifactId >generated-tado-api-client</artifactId >
14
+ <packaging >jar</packaging >
15
+
16
+ <properties >
17
+ <generated .src.folder>generated-src</generated .src.folder>
18
+ </properties >
19
+
20
+ <build >
21
+ <sourceDirectory >${generated.src.folder} /main/java</sourceDirectory >
22
+ <plugins >
23
+ <plugin >
24
+ <groupId >org.openapitools</groupId >
25
+ <artifactId >openapi-generator-maven-plugin</artifactId >
26
+ <version >7.7.0</version >
27
+ <executions >
28
+ <execution >
29
+ <goals >
30
+ <goal >generate</goal >
31
+ </goals >
32
+ <!-- supported configuration properties documentation:
33
+ https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator-maven-plugin -->
34
+ <configuration >
35
+ <!-- the essentials -->
36
+ <inputSpec >https://raw.githubusercontent.com/kritsel/tado-openapispec-v2/v2.2024.08.01.3/tado-openapispec-v2.yaml</inputSpec >
37
+ <generatorName >java</generatorName >
38
+ <library >restclient</library >
39
+
40
+ <!-- when to generate -->
41
+ <skipIfSpecIsUnchanged >true</skipIfSpecIsUnchanged >
42
+
43
+ <!-- where to generate to -->
44
+ <output >${project.basedir} /</output >
45
+
46
+ <!-- naming preferences -->
47
+ <apiNameSuffix >tado</apiNameSuffix >
48
+
49
+ <!-- java generator does not use 'packageName'
50
+ need to define the other package options instead -->
51
+ <apiPackage >tadoclient</apiPackage >
52
+ <modelPackage >tadoclient</modelPackage >
53
+ <invokerPackage >tadoclient</invokerPackage >
54
+
55
+ <!-- prevent generation of files we don't use -->
56
+ <generateModelTests >false</generateModelTests >
57
+ <generateApiTests >false</generateApiTests >
58
+ <generateModelDocumentation >false</generateModelDocumentation >
59
+ <generateApiDocumentation >false</generateApiDocumentation >
60
+
61
+ <!-- java generator specific configOptions documentation:
62
+ https://openapi-generator.tech/docs/generators/java -->
63
+ <configOptions >
64
+ <sourceFolder >${generated.src.folder} /main/java</sourceFolder >
65
+ </configOptions >
66
+
67
+ <!-- use java.time.LocalDateTime instead of java.time.OffsetDateTime -->
68
+ <typeMappings >
69
+ <typeMapping >DateTime=java.time.LocalDateTime</typeMapping >
70
+ </typeMappings >
71
+ </configuration >
72
+ </execution >
73
+ </executions >
74
+ </plugin >
75
+
76
+ <!-- ensure all generated files get removed when executing mvn clean -->
77
+ <plugin >
78
+ <artifactId >maven-clean-plugin</artifactId >
79
+ <version >3.0.0</version >
80
+ <configuration >
81
+ <filesets >
82
+ <fileset >
83
+ <!-- make sure to keep the files we maintain ourselves -->
84
+ <directory >./</directory >
85
+ <excludes >
86
+ <exclude >pom.xml</exclude >
87
+ <exclude >README.md</exclude >
88
+ <exclude >.openapi-generator-ignore</exclude >
89
+ </excludes >
90
+ </fileset >
91
+ </filesets >
92
+ </configuration >
93
+ </plugin >
94
+ </plugins >
95
+ </build >
96
+
97
+ <dependencies >
98
+ <dependency >
99
+ <groupId >org.openapitools</groupId >
100
+ <artifactId >jackson-databind-nullable</artifactId >
101
+ <version >0.2.6</version >
102
+ </dependency >
103
+ </dependencies >
104
+
105
+ </project >
0 commit comments