logo Atlassian Swagger Tools :: Maven Plugin

homepage:
fresh index:
last release: 1 year ago, first release: 4 years ago
packaging: maven-plugin
get this artifact from: atlassian




This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
atlassian-swagger:api-diff (phase: verify)
atlassian-swagger:generate-swagger (phase: process-classes)
atlassian-swagger:help

Display help information on atlassian-swagger-maven-plugin. Call mvn atlassian-swagger:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

Often used code snippets:

<plugin>
  <groupId>com.atlassian.swagger</groupId>
  <artifactId>atlassian-swagger-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-service-docs</id>
      <goals>
        <goal>generate-swagger</goal>
      </goals>
      <configuration>
        <verbose>${verbose.javadoc}</verbose>
        <debug>true</debug>
        <sourcepath>../test-resources/src/main/java</sourcepath>
        <subpackages>com.atlassian.swagger.doclet.testdata.atlassian</subpackages>
        <packages>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath</name>
            <basePath>/v0</basePath>
          </package>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath.v1</name>
            <basePath>/v1</basePath>
          </package>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath.v2</name>
            <basePath>/v2</basePath>
          </package>
        </packages>
        <swaggerTemplateFile>${project.basedir}/swagger-template.json</swaggerTemplateFile>
        <enableHiddenApiExclusion>true</enableHiddenApiExclusion>
        <narrativeDocs>
          <narrativeDoc>
            <anchor>indenting-example</anchor>
            <title>Indenting Example</title>
            <source>${basedir}/src/main/narrative/indenting.md</source>
          </narrativeDoc>
          <narrativeDoc>
            <anchor>escaping-example</anchor>
            <title>#Escaping Example</title>
            <source>${basedir}/src/main/narrative/escaping.md</source>
          </narrativeDoc>
        </narrativeDocs>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.atlassian.swagger</groupId>
  <artifactId>atlassian-swagger-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-service-docs</id>
      <goals>
        <goal>generate-swagger</goal>
      </goals>
      <configuration>
        <verbose>${verbose.javadoc}</verbose>
        <debug>true</debug>
        <sourcepath>../test-resources/src/main/java</sourcepath>
        <subpackages>com.atlassian.swagger.doclet.testdata.atlassian</subpackages>
        <packages>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath</name>
            <basePath>/v0</basePath>
          </package>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath.v1</name>
            <basePath>/v1</basePath>
          </package>
          <package>
            <name>com.atlassian.swagger.doclet.testdata.packagepath.v2</name>
            <basePath>/v2</basePath>
          </package>
        </packages>
        <swaggerTemplateFile>${project.basedir}/swagger-template.json</swaggerTemplateFile>
        <enableHiddenApiExclusion>true</enableHiddenApiExclusion>
        <narrativeDocs>
          <narrativeDoc>
            <anchor>indenting-example</anchor>
            <title>Indenting Example</title>
            <source>${basedir}/src/main/narrative/indenting.md</source>
          </narrativeDoc>
          <narrativeDoc>
            <anchor>escaping-example</anchor>
            <title>#Escaping, Example</title>
            <source>${basedir}/src/main/narrative/escaping.md</source>
          </narrativeDoc>
        </narrativeDocs>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>com.atlassian.swagger</groupId>
  <artifactId>atlassian-swagger-maven-plugin</artifactId>
  <executions>
    <execution>
      <id>generate-service-docs</id>
      <goals>
        <goal>generate-swagger</goal>
      </goals>
      <configuration>
        <verbose>${verbose.javadoc}</verbose>
        <debug>true</debug>
        <sourcepath>../test-resources/src/main/java</sourcepath>
        <subpackages>com.atlassian.swagger.doclet.testdata.atlassian</subpackages>
        <swaggerTemplateFile>${project.basedir}/swagger-template.json</swaggerTemplateFile>
        <enableHiddenApiExclusion>true</enableHiddenApiExclusion>
        <narrativeDocs>
          <narrativeDoc>
            <anchor>indenting-example</anchor>
            <title>Indenting Example</title>
            <source>${basedir}/src/main/narrative/indenting.md</source>
          </narrativeDoc>
          <narrativeDoc>
            <anchor>escaping-example</anchor>
            <title>#Escaping Example</title>
            <source>${basedir}/src/main/narrative/escaping.md</source>
          </narrativeDoc>
        </narrativeDocs>
      </configuration>
    </execution>
  </executions>
</plugin>

© Jiri Pinkas 2015 - 2020. All rights reserved. Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.