Thursday, February 1, 2018

REST Springfox/Swagger Example

REST Springfox/Swagger Example
This is a Springfox/Swagger example for documenting REST endpoints.
Build
Execute the following command from the parent directory:
mvn clean install
Once the build completes successfully, you should have the artifact rest-springfox.war in the target folder.
Deploy
You can deploy the rest-springfox.war in a Tomcat web container or any other JEE web container of your choice.
Swagger Endpoints
Once you have successfully deployed the war file, the Swagger endpoints can be accessed at:
  1. Testing Swagger 2.0 JSON API documentation
http://localhost:8080/rest-springfox/v2/api-docs
  1. Testing Swagger UI
http://localhost:8080/rest-springfox/swagger-ui.html
If you are interested in knowing more about this project, you can find in my blog 'Swagger for the REST of Us' .


No comments:

Post a Comment

Recent Post

Databricks Delta table merge Example

here's some sample code that demonstrates a merge operation on a Delta table using PySpark:   from pyspark.sql import SparkSession # cre...