# 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.7-beta/usage/telemetry/historical) and [instance](https://greymatter.gitbook.io/grey-matter-documentation/1.7-beta/usage/telemetry/instance) views.

![Service with inline OpenAPI Specification rendering](https://3431003532-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LsNFVozLgvw3NDMzxBg-1847203797%2Fuploads%2Fgit-blob-40b1af0c17fd9561cb7e7f5f57dfa1aa448ea196%2Finline-docs.png?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 `api_spec_endpoint` field on its `catalog-service` object using the `greymatter` CLI. This field can either be a relative path or a fully qualified URL.

```bash
greymatter edit catalog-service example_service
```

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

```javascript
{
  "service_id": "example-service",
  "mesh_id": "default-zone",
  "name": "Example Service",
  "version": "1.0",
  "owner": "Decipher",
  "capability": "Example",
  "api_spec_endpoint": "/services/example-service/docs"
}
```
