|
20 | 20 | <querydsl.version>5.1.0</querydsl.version> |
21 | 21 | <maven-surefire-report-plugin.version>3.5.4</maven-surefire-report-plugin.version> |
22 | 22 | <spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version> |
| 23 | + <swagger-annotations.version>2.2.39</swagger-annotations.version> |
| 24 | + <jackson-databind-nullable.version>0.2.6</jackson-databind-nullable.version> |
| 25 | + <springdoc-openapi.version>2.8.5</springdoc-openapi.version> |
| 26 | + <openapi-generator-maven-plugin.version>7.11.0</openapi-generator-maven-plugin.version> |
23 | 27 | </properties> |
24 | 28 | <dependencies> |
25 | 29 | <!-- 1) Dependencies to run the application on web-server + features to help monitor and manage a Spring Boot application: --> |
|
91 | 95 | <artifactId>spring-boot-starter-validation</artifactId> |
92 | 96 | </dependency> |
93 | 97 |
|
94 | | - <!-- Dependencies required for OpenAPI code generation --> |
| 98 | + <!-- 6) Dependencies required for OpenAPI code generation --> |
95 | 99 | <dependency> |
96 | 100 | <groupId>io.swagger.core.v3</groupId> |
97 | 101 | <artifactId>swagger-annotations</artifactId> |
98 | | - <version>2.2.28</version> |
| 102 | + <version>${swagger-annotations.version}</version> |
99 | 103 | </dependency> |
100 | 104 | <dependency> |
101 | 105 | <groupId>org.openapitools</groupId> |
102 | 106 | <artifactId>jackson-databind-nullable</artifactId> |
103 | | - <version>0.2.6</version> |
| 107 | + <version>${jackson-databind-nullable.version}</version> |
104 | 108 | </dependency> |
105 | 109 |
|
106 | | - <!-- Dependencies for OpenAPI documentation and Swagger UI --> |
| 110 | + <!-- 7) Dependencies for OpenAPI documentation and Swagger UI --> |
107 | 111 | <dependency> |
108 | 112 | <groupId>org.springdoc</groupId> |
109 | 113 | <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId> |
110 | | - <version>2.8.5</version> |
| 114 | + <version>${springdoc-openapi.version}</version> |
111 | 115 | </dependency> |
112 | 116 | </dependencies> |
113 | 117 |
|
|
197 | 201 | </plugin> |
198 | 202 |
|
199 | 203 | <!-- Spotless --> |
200 | | - <plugin> |
201 | | - <groupId>org.openapitools</groupId> |
202 | | - <artifactId>openapi-generator-maven-plugin</artifactId> |
203 | | - <version>7.11.0</version> |
204 | | - <executions> |
205 | | - <execution> |
206 | | - <id>appointmentBooking</id> |
207 | | - <goals> |
208 | | - <goal>generate</goal> |
209 | | - </goals> |
210 | | - <configuration> |
211 | | - <inputSpec>${project.basedir}/api/openapi.yml</inputSpec> |
212 | | - <output>${project.build.directory}/generated-sources/openapi</output> |
213 | | - <cleanupOutput>true</cleanupOutput> |
214 | | - <generatorName>spring</generatorName> |
215 | | - <apiPackage>com.capgemini.training.appointmentbooking.service.api</apiPackage> |
216 | | - <modelPackage>com.capgemini.training.appointmentbooking.service.model</modelPackage> |
217 | | - <!--<supportingFilesToGenerate>ApiUtil.java</supportingFilesToGenerate>--> |
218 | | - <generateApiTests>false</generateApiTests> |
219 | | - <generateModelTests>false</generateModelTests> |
220 | | - <configOptions> |
221 | | -<!-- <delegatePattern>true</delegatePattern>--> |
222 | | - <useTags>true</useTags> |
223 | | - <library>spring-boot</library> |
224 | | - <interfaceOnly>true</interfaceOnly> |
225 | | - <skipDefaultInterface>true</skipDefaultInterface> |
226 | | - <useSpringBoot3>true</useSpringBoot3> |
227 | | - <useOptional>true</useOptional> |
228 | | - <useBeanValidation>true</useBeanValidation> |
229 | | - <dateLibrary>java-time</dateLibrary> |
230 | | - <generateBuilders>false</generateBuilders> |
231 | | - <generateConstructorWithAllArgs>true</generateConstructorWithAllArgs> |
232 | | - <additionalModelTypeAnnotations> |
233 | | - @lombok.Generated |
234 | | - @lombok.ToString |
235 | | - </additionalModelTypeAnnotations> |
236 | | - <documentationProvider>source</documentationProvider> |
237 | | - <annotationLibrary>swagger2</annotationLibrary> |
238 | | - </configOptions> |
239 | | - </configuration> |
240 | | - </execution> |
241 | | - </executions> |
242 | | - </plugin> |
243 | 204 | <plugin> |
244 | 205 | <groupId>com.diffplug.spotless</groupId> |
245 | 206 | <artifactId>spotless-maven-plugin</artifactId> |
|
290 | 251 | <generatedSourcesDirectory>target/generated-sources/annotations</generatedSourcesDirectory> |
291 | 252 | </configuration> |
292 | 253 | </plugin> |
| 254 | + |
| 255 | + <!-- OpenAPI Generator Maven Plugin --> |
| 256 | + <plugin> |
| 257 | + <groupId>org.openapitools</groupId> |
| 258 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 259 | + <version>${openapi-generator-maven-plugin.version}</version> |
| 260 | + <executions> |
| 261 | + <execution> |
| 262 | + <id>appointmentBooking</id> |
| 263 | + <goals> |
| 264 | + <goal>generate</goal> |
| 265 | + </goals> |
| 266 | + <configuration> |
| 267 | + <inputSpec>${project.basedir}/api/openapi.yml</inputSpec> |
| 268 | + <output>${project.build.directory}/generated-sources/openapi</output> |
| 269 | + <cleanupOutput>true</cleanupOutput> |
| 270 | + <generatorName>spring</generatorName> |
| 271 | + <apiPackage>com.capgemini.training.appointmentbooking.service.api</apiPackage> |
| 272 | + <modelPackage>com.capgemini.training.appointmentbooking.service.model</modelPackage> |
| 273 | + <generateApiTests>false</generateApiTests> |
| 274 | + <generateModelTests>false</generateModelTests> |
| 275 | + <configOptions> |
| 276 | + <useTags>true</useTags> |
| 277 | + <library>spring-boot</library> |
| 278 | + <interfaceOnly>true</interfaceOnly> |
| 279 | + <skipDefaultInterface>true</skipDefaultInterface> |
| 280 | + <useSpringBoot3>true</useSpringBoot3> |
| 281 | + <useOptional>true</useOptional> |
| 282 | + <useBeanValidation>true</useBeanValidation> |
| 283 | + <dateLibrary>java-time</dateLibrary> |
| 284 | + <generateBuilders>false</generateBuilders> |
| 285 | + <generateConstructorWithAllArgs>true</generateConstructorWithAllArgs> |
| 286 | + <additionalModelTypeAnnotations> |
| 287 | + @lombok.Generated |
| 288 | + @lombok.ToString |
| 289 | + </additionalModelTypeAnnotations> |
| 290 | + <documentationProvider>source</documentationProvider> |
| 291 | + <annotationLibrary>swagger2</annotationLibrary> |
| 292 | + </configOptions> |
| 293 | + </configuration> |
| 294 | + </execution> |
| 295 | + </executions> |
| 296 | + </plugin> |
293 | 297 | </plugins> |
294 | 298 | </build> |
295 | 299 | </project> |
0 commit comments