Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/moronicgeek/swaggercloud

An Swagger API document catalog.
https://github.com/moronicgeek/swaggercloud

microservice spring-boot swagger swagger-cloud swagger-documentation

Last synced: 18 days ago
JSON representation

An Swagger API document catalog.

Awesome Lists containing this project

README

        

![alt text](./swaggercloud.png "Swagger Cloud") Swagger Cloud
=============================================================
[![Travis CI](https://travis-ci.org/moronicgeek/SwaggerCloud.svg?branch=master)](https://travis-ci.org/moronicgeek/SwaggerCloud.svg?branch=master)
[![Apache License 2](https://img.shields.io/badge/license-ASF2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.txt)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1c17f07400bc4dbc9e9bc93861d73bb8)](https://www.codacy.com/app/patel-muhammed/SwaggerCloud?utm_source=github.com&utm_medium=referral&utm_content=moronicgeek/SwaggerCloud&utm_campaign=Badge_Grade)
[![codecov](https://codecov.io/gh/moronicgeek/SwaggerCloud/branch/master/graph/badge.svg)](https://codecov.io/gh/moronicgeek/SwaggerCloud)

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](https://github.com/swagger-api/swagger-uiswagger/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.
```

com.github.moronicgeek.swagger
client
${project.version}

```


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](https://github.com/moronicgeek/SwaggerCloud/wiki/Server-Api)

```

com.github.moronicgeek.swagger
server
0.1

```

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

https://github.com/kongchen/swagger-maven-plugin

https://github.com/springfox/springfox