A swagger extension for fluenthttp which provides Swagger REST API documentation automatically (Swagger spec v2.0). For information about supported format see parser : https://github.com/livingobjects/myrddin/blob/develop/README.md
This module is done to be deployed to your fluenthttp.
- an HTML page which display the REST API documentation as a styled UI.
- and the raw swagger file (in YAML)
See details below for the routes created by fluenthttp-swagger.
new WebServer().configure(routes -> SwaggerEntryPoint.addApiDocRoutes(routes, swaggerFiles))We are waiting for CodeStory/fluent-http#102 to be merged
Run maven
mvn clean installTo deploy to your local repository use "altDeploymentRepository" option like this :
mvn deploy -DaltDeploymentRepository=nexus::default::http://xxx.xx.xx.xx:8081/nexus/content/repositories/snapshotsOr to deploy a release:
mvn deploy -DaltDeploymentRepository=nexus::default::http://xxx.xx.xx.xx:8081/nexus/content/repositories/releasesYou have to deploy the fluenthttp-swagger module and its dependencies : myrddin, snakeyaml into your application.
Into your own application, add a Swagger YAML documentation of your REST api, example:
src/main/resources/swagger/api.yaml
See example on Swagger 2.0 format on http://editor.swagger.io/
Fluenthttp-swagger will server the documentation.
It will read all the base uris routes defined into your Swagger documentation and serve a page for these uris.
Example:
#Swagger file
paths:
/route1/test
[...]
/route2/test
[...]The following urls will be served:
http://localhost:9000/api-doc/route1
http://localhost:9000/api-doc/route2
