Skip to content

Commit 304f248

Browse files
committed
feat(*): move generator into its own library
1 parent 984458a commit 304f248

File tree

14 files changed

+76
-10
lines changed

14 files changed

+76
-10
lines changed

pom.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@
3131
<maven.compiler.target>1.8</maven.compiler.target>
3232
<maven.version>3.3.1</maven.version>
3333
<maven-plugin-tools.version>3.5.2</maven-plugin-tools.version>
34-
<restdocs-openapi.version>0.2.9</restdocs-openapi.version>
34+
<restdocs-openapi.version>0.3.1</restdocs-openapi.version>
3535
<junit.version>5.2.0</junit.version>
3636
<assertj.version>3.11.0</assertj.version>
3737
<mockito.version>2.21.0</mockito.version>
3838
</properties>
3939

4040
<modules>
41+
<module>restdocs-spec-generator</module>
4142
<module>restdocs-spec-maven-plugin</module>
4243
</modules>
4344

@@ -67,11 +68,21 @@
6768
<version>${maven-plugin-tools.version}</version>
6869
<scope>provided</scope>
6970
</dependency>
71+
<dependency>
72+
<groupId>javax.inject</groupId>
73+
<artifactId>javax.inject</artifactId>
74+
<version>1</version>
75+
</dependency>
7076
<dependency>
7177
<groupId>com.github.epages-de.restdocs-openapi</groupId>
7278
<artifactId>restdocs-openapi-generator</artifactId>
7379
<version>${restdocs-openapi.version}</version>
7480
</dependency>
81+
<dependency>
82+
<groupId>com.github.epages-de.restdocs-openapi</groupId>
83+
<artifactId>restdocs-openapi-model</artifactId>
84+
<version>${restdocs-openapi.version}</version>
85+
</dependency>
7586
<dependency>
7687
<groupId>org.junit.jupiter</groupId>
7788
<artifactId>junit-jupiter-api</artifactId>
@@ -172,9 +183,9 @@
172183
<version>3.1.0</version>
173184
</plugin>
174185
<plugin>
175-
<groupId>org.sonatype.plugins</groupId>
186+
<groupId>org.eclipse.sisu</groupId>
176187
<artifactId>sisu-maven-plugin</artifactId>
177-
<version>1.4</version>
188+
<version>0.3.3</version>
178189
</plugin>
179190
</plugins>
180191
</pluginManagement>

restdocs-spec-generator/pom.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?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"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>com.github.berkleytechnologyservices.restdocs-spec</groupId>
8+
<artifactId>restdocs-spec</artifactId>
9+
<version>0.6-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>restdocs-spec-generator</artifactId>
13+
14+
<name>Restdocs Spec Generator</name>
15+
<description>Generate API specifications using snippets generated by Spring Rest Docs.</description>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.github.epages-de.restdocs-openapi</groupId>
20+
<artifactId>restdocs-openapi-generator</artifactId>
21+
</dependency>
22+
<dependency>
23+
<groupId>com.github.epages-de.restdocs-openapi</groupId>
24+
<artifactId>restdocs-openapi-model</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>javax.inject</groupId>
28+
<artifactId>javax.inject</artifactId>
29+
<scope>provided</scope>
30+
</dependency>
31+
</dependencies>
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.eclipse.sisu</groupId>
37+
<artifactId>sisu-maven-plugin</artifactId>
38+
<executions>
39+
<execution>
40+
<id>generate-index</id>
41+
<goals>
42+
<goal>main-index</goal>
43+
</goals>
44+
</execution>
45+
</executions>
46+
</plugin>
47+
</plugins>
48+
</build>
49+
50+
</project>

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/ApiDetails.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/ApiDetails.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/AuthConfig.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/AuthConfig.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/Scope.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/Scope.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/Specification.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/Specification.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/SpecificationFormat.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/SpecificationFormat.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGenerator.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.berkleytechnologyservices.restdocs.spec.ApiDetails;
44
import com.berkleytechnologyservices.restdocs.spec.Specification;
5-
import com.epages.restdocs.openapi.generator.ResourceModel;
5+
import com.epages.restdocs.openapi.model.ResourceModel;
66

77
import java.util.List;
88

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGeneratorException.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGeneratorException.java

File renamed without changes.

restdocs-spec-maven-plugin/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGeneratorFactory.java renamed to restdocs-spec-generator/src/main/java/com/berkleytechnologyservices/restdocs/spec/generator/SpecificationGeneratorFactory.java

File renamed without changes.

0 commit comments

Comments
 (0)