It is a tool to generate interactive documentation for your REST API.
The tool is available as a ZPM module. You can install the tool easy:
USER> zpm
ZPM: USER> install swagger-ui- Create REST API
- Provide Swagger Spec url for your REST API
- Open browser and go to SwaggerUI page (http://localhost:52773/swagger-ui/index.html) and enter your Swagger Spec url
## Making your url in swagger-ui deafault Assuming you've installed swagger-ui (e.g. via zpm as mentioned above) you may want to change the default endpoint to your one. In docker environment you can make it as follows. Add to Dockerfile after IRIS start new lines:
RUN old=http://localhost:52773/crud/_spec && \
new=http://localhost:52773/your/api/_spec && \
sed -i "s|$old|$new|g" /usr/irissys/csp/swagger-ui/swagger-initializer.js
That's it.
Any contribution is welcome. To start you can clone the repository and up the project in Docker.
$ git clone https://github.com/atygaev/iris-web-swagger-ui.git
$ cd iris-web-swagger-ui
$ docker-compose up -dFor your convenience the project contains simple REST API (src/Sample/PersonREST.cls).
Swagger documentation for the REST API is available at http://localhost:52773/swagger-ui/index.html
