title: Swagger UI
description: Create a Swagger UI for your REST API

### Installation (Gradle)

```groovy
implementation group: "org.http4k", name: "http4k-contract", version: "4.27.4.0"
```

### About
Http4k's contract module has a built-in method to render a Swagger UI for your **OpenApi** v2 or v3 description.
For more detail on generating contracts, see:

- [Http4k Reference: Contracts](/guide/reference/contracts)
- [http4k How-to: Integrate with OpenAPI](/guide/howto/integrate_with_openapi)

### Example [<img class="octocat"/>](https://github.com/http4k/http4k/blob/master/src/docs/guide/howto/create_a_swagger_ui/example.kt)

<script src="https://gist-it.appspot.com/https://github.com/http4k/http4k/blob/master/src/docs/guide/howto/create_a_swagger_ui/example.kt"></script>


title: Swagger UI
description: Create a Swagger UI for your REST API

### Installation (Gradle)

```groovy
implementation group: "org.http4k", name: "http4k-contract", version: "4.28.1.0"
```

### About
Http4k's contract module has a built-in method to render a Swagger UI for your **OpenApi** v2 or v3 description.
For more detail on generating contracts, see:

- [Http4k Reference: Contracts](/guide/reference/contracts)
- [http4k How-to: Integrate with OpenAPI](/guide/howto/integrate_with_openapi)

### Example [<img class="octocat"/>](https://github.com/http4k/http4k/blob/master/src/docs/guide/howto/create_a_swagger_ui/example.kt)

<script src="https://gist-it.appspot.com/https://github.com/http4k/http4k/blob/master/src/docs/guide/howto/create_a_swagger_ui/example.kt"></script>


Fix module version in docs
Fix module version in docs
