Skip to content

Files

Latest commit

3f914da · Jan 13, 2021

History

History

cart-spec

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 15, 2020
Jan 13, 2021
Jul 15, 2020
Jul 15, 2020
Jul 15, 2020
Jul 15, 2020
Jul 15, 2020

OpenAPI Spec Template

Include the generated spec

<dependency>
    <groupId>lol.maki.socks</groupId>
    <artifactId>cart-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 cart-spec/pom.xml -P spec
  • Java Client
./mvnw -V clean generate-sources -f cart-spec/pom.xml -P client