https://github.com/seratch/spring-boot-swagger-demo
Spring Boot example to demonstrate how to integrate Swagger 2.0 and swagger-codegen
https://github.com/seratch/spring-boot-swagger-demo
Last synced: about 1 year ago
JSON representation
Spring Boot example to demonstrate how to integrate Swagger 2.0 and swagger-codegen
- Host: GitHub
- URL: https://github.com/seratch/spring-boot-swagger-demo
- Owner: seratch
- License: mit
- Created: 2016-02-19T08:44:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-21T23:01:38.000Z (over 10 years ago)
- Last Synced: 2025-03-24T04:22:33.879Z (over 1 year ago)
- Language: Java
- Size: 75.2 KB
- Stars: 5
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Spring Boot Swagger Demo
This sample application shows you how to do the following things:
- Swagger 2.0 Integration
- Swagger CodeGen Integration
- Testing services
- Testing controllers
- Running integration tests with RestAssured / embedded Spring Boot server
- Enabling Spring Loaded when running spring-boot app on Maven plugin
## Getting Started
### Invoking Spring Boot server
spring-boot maven plugin requires Maven 3.
```
brew install maven
mvn spring-boot:run
```
Swagger integration is already available:
- http://localhost:8080/v2/api-docs
- http://localhost:8080/swagger-ui.html#/
Run all the tests:
```
mvn test
```
### Generating Swagger client implementation
```
brew install swagger-codegen
./generate-client.sh
```
`generate-client.sh` outputs Java source code into ./client directory and does `mvn install`.
### Trying Swagger client implementation
```
cd ./client-test
./gradew test
```
## License
The MIT License