Skip to content

Include HTTP headers #1367

Closed
Closed
@bkoelman

Description

@bkoelman

Swagger UI currently does not display HTTP request/response headers.

This should be possible, according to https://github.com/mattfrear/Swashbuckle.AspNetCore.Filters#add-a-response-header.

Headers to describe in OAS:

  • Location (out) on POST resource endpoint
  • If-None-Match (in) on GET/HEAD endpoints
  • ETag (out) on GET/HEAD endpoints
  • Content-Length (out) on HEAD requests

As a safety mechanism, an incoming If-Match produces an error that indicates wrong usage. There's no need to include it in OAS.

HTTP-level caching is one of the key advantages of using JSON:API, compared to competing technologies. So we should strive to offer the experience described at https://www.jsonapi.net/usage/caching.html using generated client libraries.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions