# Inline Documentation

The Grey Matter Application has built-in support for rendering inline [OpenAPI documentation v2 - v3](https://swagger.io/specification/). Services configured with an inline documentation specification will render an "API Documentation" tab across [historical](https://greymatter.gitbook.io/grey-matter-documentation/1.3/usage/telemetry/historical) and [instance](https://greymatter.gitbook.io/grey-matter-documentation/1.3/usage/telemetry/instance) views.

![Service with inline OpenAPI Specification rendering](https://1676458320-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LsNFVozLgvw3NDMzxBg%2Fsync%2F40b1af0c17fd9561cb7e7f5f57dfa1aa448ea196.png?generation=1605727883173814\&alt=media)

## Enable inline documentation

To enable inline documentation rendering, the Grey Matter Application must be deployed with the `ENABLE_INLINE_DOCS` environment variable set to `true`. This will activate the "API Documentation" tab within the UI.

To configure the endpoint where API specifications will be pulled, update the service's `apiSpecEndpoint` field on its `catalog_cluster` object using the `greymatter` CLI. This field can either be a relative path or a fully qualified URL.

```bash
greymatter edit catalog_cluster example_service
```

In the open editor window, set the `apiSpecEndpoint` to a relative path like the example below.

```javascript
{
  "clusterName": "example-service",
  "zoneName": "default-zone",
  "name": "Example Service",
  "version": "1.0",
  "owner": "Decipher",
  "capability": "Example",
  "apiSpecEndpoint": "/services/example-service/docs"
}
```
