Skip to content
Thomas Cujé edited this page Nov 9, 2015 · 6 revisions

Serving Swagger for a LAS2peer Service

Once you have created your restful LAS2peer service, you should provide good documentation for external developers. LAS2peer uses Swagger for this purpose. With a couple of additional annotations to your service, LAS2peer (in particular the LAS2peer Web Connector) auto-generates Swagger documents and hosts them along with your service. This tutorial provides instructions on how to achieve this in two steps.

1. Annotate your service

Take a look at the available Swagger annotations on this documentation to make your LAS2peer service swagger-ready by adding the required annotations to your service.

An example for an Swagger annotated service is the TemplateService itself.

2. Get Swagger API Listing

The Swagger API listing's endpoint is Swagger compliant under http(s)://ROOT_URL/swagger.json and serves all Swagger documentations known to this WebConnector instance. For your local running instance this is usually: http://localhost:8080/swagger.json

Clone this wiki locally