Swagger UI - SirajChaudhary/comprehensive-example-on-microservices-using-spring-boot-with-spring-cloud GitHub Wiki
Swagger UIs will be used just for testing purpose. It won't route via API Gateway. We run like an independent swagger-ui of each microservice.
Step1: Add maven depedency in pom.xml of every microservice
<!-- openapi ui (swagger-ui) -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.10</version>
</dependency>
Step2: Add swagger-ui custom URL in application.yml
springdoc:
swagger-ui:
path: /swagger-ui.html
Step3: Swagger UIs for microservices
- airport-pilot-service http://localhost:8081/swagger-ui.html
- airport-flight-service http://localhost:8082/swagger-ui.html
- airport-booking-service http://localhost:8083/swagger-ui.html
- airport-security-service http://localhost:8084/swagger-ui.html
- airport-checkin-service http://localhost:8085/swagger-ui.html
- airport-boarding-service http://localhost:8086/swagger-ui.html