Skip to content

Include HTTP headers #1367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bkoelman opened this issue Oct 25, 2023 · 0 comments
Closed

Include HTTP headers #1367

bkoelman opened this issue Oct 25, 2023 · 0 comments

Comments

@bkoelman
Copy link
Member

bkoelman commented Oct 25, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant