Swagger Cloud
An API document catalog. This project centralises your swagger documentation in one portal. If your api has a swagger json file then the swagger cloud server can consume that to consolidate all your api documentation. The project leverages of the swagger/swagger-ui project for the swagger interface. The server is a spring boot plugin that allows you to get up and running quickly.
What it is ?
It is a document cloud catalog. It catalogs your swagger applications documentation.
What it's not?
It's not an API Manager
Usage
Modes
Client(Standalone)
Simply add the following maven dependency to your project.
<dependency>
<groupId>com.github.moronicgeek.swagger</groupId>
<artifactId>client</artifactId>
<version>${project.version}</version>
</dependency>
and add the following properties to your application.properties or application.yml
swagger.cloud.boot.client.name=IchiServerAPI
swagger.cloud.boot.client.swagger-url=http://{SWAGGER CLOUD SERVER}:{SWAGGER CLOUD PORT}/swagger.json
swagger.cloud.boot.admin.url=http://localhost:8084
swagger.cloud.boot.admin.apiPath=/test/register
See clients in example folder.
Client (Cloud)
Swagger Cloud supports any spring cloud enabled service discovery(Eureka) which allows the Server to discover clients as they are registered. The system reads the registry and pings clients for a success response at the /swaggercloud/properties endpoint.
Once discovered a delta is updated to swagger clouds registry. The server uses eureka to discover a client in an UP/DOWN state.
Server
The server requires a basic spring boot application with the (@EnableSwaggerCloudServer) annotation in your application config. The server could integrate with any other language as the server exposes a restful api for you to use. Please refer to the Server Api documentation in the wiki. Server API
<dependency>
<groupId>com.github.moronicgeek.swagger</groupId>
<artifactId>server</artifactId>
<version>0.1</version>
</dependency>
add this annotation to your SpringBootApplication configuration
@EnableSwaggerCloud
Have a look at the server project in our samples project.
Get coding
Pull requests are always welcome.
Need to generate a swagger.json file?
Have a look at the following projects to auto generate a swagger definition for you