# Documenting response headers added by an interceptor

**URL:** <https://softwaremill.community/t/documenting-response-headers-added-by-an-interceptor/201>\
**Category:** tapir\
**Created:** [May 10, 2023, 4:47pm UTC](https://softwaremill.community/t/documenting-response-headers-added-by-an-interceptor/201 "2023-05-10T16:47:27Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![adamw](https://dub1.discourse-cdn.com/flex005/user_avatar/softwaremill.community/adamw/32/28_2.png) [@adamw](https://softwaremill.community/u/adamw)\
**Post date:** [May 11, 2023, 8:09pm UTC](https://softwaremill.community/t/documenting-response-headers-added-by-an-interceptor/201/4 "2023-05-11T20:09:52Z")

</div>

If you have a list of endpoints for which you want to generate documentation, you can modify that list before passing it to the documentation interpreter. E.g.:

```auto
val myEndpoints: List[AnyEndpoint] = ???

val myEndpointsWithHeader = myEndpoints.map(_.out(header(...)))

val swaggerEndpoints = SwaggerInterpreter().fromEndpoints[Future](myEndpointsWithHeader, "My App", "1.0")

```

---

_[View the full topic](https://softwaremill.community/t/documenting-response-headers-added-by-an-interceptor/201)._
