Skip to content

Files

Latest commit

e965af0 · Oct 15, 2020

History

History

user-spec

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 20, 2020
Oct 15, 2020
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020
Jul 20, 2020

OpenAPI Spec Template

Include the generated spec

<dependency>
    <groupId>lol.maki.socks</groupId>
    <artifactId>user-spec</artifactId>
    <version>0.1.0-SNAPSHOT</version>
    <exclusions>
        <exclusion>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </exclusion>
        <exclusion>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>swagger-ui</artifactId>
    <version>3.27.0</version>
</dependency>
<dependency>
    <groupId>org.webjars</groupId>
    <artifactId>webjars-locator-core</artifactId>
</dependency>

and

<repositories>
    <repository>
        <id>sonatype-snapshots</id>
        <name>Sonatype Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

How to generate source code from the spec

  • Java API Spec
./mvnw -V clean generate-sources -f user-spec/pom.xml -P spec
  • Java Client
./mvnw -V clean generate-sources -f user-spec/pom.xml -P client