|
| 1 | +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 2 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
| 3 | + <modelVersion>4.0.0</modelVersion> |
| 4 | + <groupId>org.openapitools</groupId> |
| 5 | + <artifactId>sample-project</artifactId> |
| 6 | + <packaging>jar</packaging> |
| 7 | + <version>1.0-SNAPSHOT</version> |
| 8 | + <name>sample-project</name> |
| 9 | + <url>http://maven.apache.org</url> |
| 10 | + |
| 11 | + <parent> |
| 12 | + <groupId>org.springframework.boot</groupId> |
| 13 | + <artifactId>spring-boot-starter-parent</artifactId> |
| 14 | + <version>2.2.1.RELEASE</version> |
| 15 | + </parent> |
| 16 | + <build> |
| 17 | + <plugins> |
| 18 | + <!-- activate the plugin --> |
| 19 | + <plugin> |
| 20 | + <groupId>org.openapitools</groupId> |
| 21 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 22 | + <!-- RELEASE_VERSION --> |
| 23 | + <version>4.2.1-SNAPSHOT</version> |
| 24 | + <!-- /RELEASE_VERSION --> |
| 25 | + <executions> |
| 26 | + <execution> |
| 27 | + <id>spring-server</id> |
| 28 | + <goals> |
| 29 | + <goal>generate</goal> |
| 30 | + </goals> |
| 31 | + <configuration> |
| 32 | + <!-- specify the swagger yaml --> |
| 33 | + <inputSpec>${project.basedir}/swagger.yaml</inputSpec> |
| 34 | + |
| 35 | + <!-- target to generate java client code --> |
| 36 | + <generatorName>spring</generatorName> |
| 37 | + |
| 38 | + <!-- hint: if you want to generate java server code, e.g. based on Spring Boot, |
| 39 | + you can use the following target: <generatorName>spring</generatorName> --> |
| 40 | + |
| 41 | + <!-- pass any necessary config options --> |
| 42 | + <configOptions> |
| 43 | + <serializableModel>true</serializableModel> |
| 44 | + <snapshotVersion>true</snapshotVersion> |
| 45 | + </configOptions> |
| 46 | + |
| 47 | + </configuration> |
| 48 | + </execution> |
| 49 | + |
| 50 | + </executions> |
| 51 | + </plugin> |
| 52 | + <plugin> |
| 53 | + <groupId>org.apache.maven.plugins</groupId> |
| 54 | + <artifactId>maven-compiler-plugin</artifactId> |
| 55 | + <version>3.8.1</version> |
| 56 | + <configuration> |
| 57 | + <source>1.8</source> |
| 58 | + <target>1.8</target> |
| 59 | + <proc>none</proc> |
| 60 | + </configuration> |
| 61 | + </plugin> |
| 62 | + </plugins> |
| 63 | + <pluginManagement> |
| 64 | + </pluginManagement> |
| 65 | + </build> |
| 66 | + <pluginRepositories> |
| 67 | + <pluginRepository> |
| 68 | + <id>sonatype-snapshots</id> |
| 69 | + <url>https://oss.sonatype.org/content/repositories/snapshots/</url> |
| 70 | + </pluginRepository> |
| 71 | + </pluginRepositories> |
| 72 | + <dependencies> |
| 73 | + <!-- dependencies are needed for the client being generated --> |
| 74 | + |
| 75 | + <dependency> |
| 76 | + <groupId>io.swagger</groupId> |
| 77 | + <artifactId>swagger-annotations</artifactId> |
| 78 | + <version>${swagger-annotations-version}</version> |
| 79 | + </dependency> |
| 80 | + |
| 81 | + <!-- You can find the dependencies for the library configuation you chose by looking in JavaClientCodegen. |
| 82 | + Then find the corresponding dependency on Maven Central, and set the versions in the property section below --> |
| 83 | + |
| 84 | + <dependency> |
| 85 | + <groupId>org.springframework.boot</groupId> |
| 86 | + <artifactId>spring-boot-starter-web</artifactId> |
| 87 | + </dependency> |
| 88 | + <!--SpringFox dependencies --> |
| 89 | + <dependency> |
| 90 | + <groupId>io.springfox</groupId> |
| 91 | + <artifactId>springfox-swagger2</artifactId> |
| 92 | + <version>${springfox-version}</version> |
| 93 | + </dependency> |
| 94 | + <dependency> |
| 95 | + <groupId>io.springfox</groupId> |
| 96 | + <artifactId>springfox-swagger-ui</artifactId> |
| 97 | + <version>${springfox-version}</version> |
| 98 | + </dependency> |
| 99 | + <dependency> |
| 100 | + <groupId>javax.xml.bind</groupId> |
| 101 | + <artifactId>jaxb-api</artifactId> |
| 102 | + <version>2.2.11</version> |
| 103 | + </dependency> |
| 104 | + <dependency> |
| 105 | + <groupId>com.fasterxml.jackson.datatype</groupId> |
| 106 | + <artifactId>jackson-datatype-jsr310</artifactId> |
| 107 | + </dependency> |
| 108 | + <dependency> |
| 109 | + <groupId>org.openapitools</groupId> |
| 110 | + <artifactId>jackson-databind-nullable</artifactId> |
| 111 | + <version>0.1.0</version> |
| 112 | + </dependency> |
| 113 | + <!-- Bean Validation API support --> |
| 114 | + <dependency> |
| 115 | + <groupId>javax.validation</groupId> |
| 116 | + <artifactId>validation-api</artifactId> |
| 117 | + </dependency> |
| 118 | + </dependencies> |
| 119 | + |
| 120 | + <properties> |
| 121 | + <swagger-annotations-version>1.5.8</swagger-annotations-version> |
| 122 | + |
| 123 | + <spring-boot-starter-web.version>2.2.1.RELEASE</spring-boot-starter-web.version> |
| 124 | + <springfox-version>2.8.0</springfox-version> |
| 125 | + </properties> |
| 126 | +</project> |
0 commit comments