Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions play-2.6/swagger-play2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ sbt publishLocal
There are just a couple steps to integrate your Play2 app with swagger.

1\. Add the Swagger module to your `application.conf`

```
play.modules.enabled += "play.modules.swagger.SwaggerModule"
```

2\. Add the resource listing to your routes file (you can read more about the resource listing [here](https://github.com/swagger-api/swagger-core/wiki/Resource-Listing))

```
Expand Down Expand Up @@ -126,8 +126,11 @@ swagger.api.info = {
## Note on Dependency Injection
This plugin works by default if your application uses Runtime dependency injection.

Nevertheless, a helper is provided `SwaggerApplicationLoader` to ease the use of this plugin with Compile Time Dependency Injection.

Nevertheless, this can be initialized using compile time dependency injections using the following:
```
val swaggerPlugin = new SwaggerPluginImpl(lifecycle, router, app) // Can't be lazy because of PlayApiScanner initialization side effect
lazy val apiHelpController = new ApiHelpController(components, configuration)
```

## License

Expand Down