Skip to content

A maven build plugin which helps you generate Swagger JSON and API document during build phase

License

Notifications You must be signed in to change notification settings

stolarczykt/swagger-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ninja Swagger Maven Plugin

This plugin is created based on Swager Maven Plugin, and lets your Ninja project generate Swagger JSON and your customized API documents in build phase.

Minimal plugin configuration:

<build>
...
	<plugins>
	...
		<plugin>
			<groupId>com.github.kongchen</groupId>
			<artifactId>swagger-maven-plugin</artifactId>
			<version>2.3.1-SNAPSHOT</version>
			<configuration>
				<apiSources>
					<apiSource>
						<routesClass>conf.Routes</routesClass>
						<apiVersion>v1</apiVersion>
						<hostUrl>http://localhost:8080</hostUrl>
						<apiUri>/backend</apiUri>
						<swaggerDirectory>src/main/java/assets/swagger</swaggerDirectory>
						<swaggerUIDocBasePath>http://localhost:8080/swagger</swaggerUIDocBasePath>
					</apiSource>
				</apiSources>
			</configuration>
			<executions>
				<execution>
					<phase>compile</phase>
					<goals>
						<goal>generate</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
	...
	</plugins>
...
</build>

About

A maven build plugin which helps you generate Swagger JSON and API document during build phase

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%