Skip to content

Spring Boot example to demonstrate how to integrate Swagger 2.0 and swagger-codegen

License

Notifications You must be signed in to change notification settings

seratch/spring-boot-swagger-demo

Repository files navigation

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:

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

About

Spring Boot example to demonstrate how to integrate Swagger 2.0 and swagger-codegen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published