question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Structural improvements: enhance headers handling

See original GitHub issue

Following (again) ideas from #563 and #684, extending #369:

  • define reusable response headers (like parameters or definitions as proposed in #563 by @fehguy )
  • set responses headers on each level: whole api, path, operation, responses (and response as stated in #369)
paths:
  responseHeaders:
     # Headers returned on all api responses
  /resources:
    responseHeaders:
      # Headers returned on all /resources operations responses
    get:
      responseHeaders:
        # Headers returned on all operations responses
      200:
         headers:
           # Headers returned on this response
schemas:
  responseHeaders:
    # reusable headers describe with a Header Object, used with $ref

The problem is the naming consistency: responseHeaders almost everywhere vs headers on response level. What if we use headers or responseHeaders everywhere?

nb: and don’t forget to modify Header Object to include #321 (required)

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:28
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
etoewscommented, Jun 9, 2016

Being able to define reusable response headers in someway is a necessity. Having to constantly repeat yourself for response headers is a significant maintenance burden.

2reactions
n-alex-whitecommented, Jun 16, 2020

Four years on, are we any closer to getting response headers definable as components in the same way that request headers are?

Is there anything that can be done to help move this issue forwards somehow?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Improving HTTP with structured header fields - Fastly
Making it easier to specify new fields plus making them safer and more interoperable to handle is a significant improvement to HTTP. What...
Read more >
Share header with multiple response objects #369 - GitHub
Can there not just be a simple header generically at the response level not specific to each of ... Structural improvements: enhance headers...
Read more >
Evaluating Modification of Major Structural Components
Any proposed increase in the height or length of a structure's nonconforming ... studs, girders, headers, king studs or top plates, and also...
Read more >
draft-ietf-httpbis-header-structure-15
Structured Headers for HTTP (Internet-Draft, 2020) ... algorithms that are intended to make it easier and safer to define and handle HTTP header...
Read more >
Improving our client program - Scott Klement
Improving our client program ... 4.1. improvement #1: header files ... constants and data structures that we use for sockets into a "header...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found