Response headers and their consistency
So, the problem here is with environments. Since the docs are generated in the test environment, the response headers will almost never match the production headers.
Things like cache control, ETag, last-modified, etc. are going to be very different.
Right now I didn't find a way to describe response headers or any way to filter them.
I'd like to propose showing only the headers that are consistent between environments, like content-type and the status code. Or if that's not possible to guess, at least have a filter of some kind to explicitly tell the docs which headers can be relied upon.
Maybe something like:
response_headers [:cache-control, :content-type]
Having headers on the doc that are not on the real API is very confusing and can lead to developers relying on unreliable headers.
:+1: , inconsistants headers could lead to misinterpretations. Maybe passing headers to filter in the configure block like this config.headers_to_filter = [] ?
:+1: for filtering response headers
This was fixed with two new config options #request_headers_to_include and #response_headers_to_include.
I think it would be nice to have blacklist. I know list of headers that make most noise and not necessary in documentation, but i may easily forget about some special header in some special test (or add it and remove test later, forgetting about header in the config). I would prefer to specify which headers i always want to filter. Developer who read my api documentation may get used to completely ignore my headers information, simple because there's too much noise headers.