It seems that API Blueprint doesn't allow for multiple HTTP headers.
According to ye olde RFC 2616 it is possible to have multiple HTTP headers. RFC 7230 makes it clearer:
A sender MUST NOT generate multiple header fields with the same field
name in a message unless either the entire field value for that
header field is defined as a comma-separated list [i.e., #(values)]
or the header field is a well-known exception (as noted below).
Things like the Prefer
and Link
headers are often presented on individual lines for legibility.
API Blueprint currently requires that you present them on a single line as a comma separated list (which is fine enough), but making it more legible by allowing them to be written on separate lines, would be ideal.
Thanks!
:tophat:
For completeness, the Set-Cookie
and Link
header are "tolerated" by parser. Question is whether:
Seems like me and @BigBlueHat are up for removing the warning altogether...
Notes on current implementation https://github.com/apiaryio/snowcrash/issues/75#issuecomment-58886108
Removing the warning has the advantage of allowing people to create their own custom headers which could potentially be defined as having comma separated list values. Hard to know the future, so "be liberal in what you accept from others." :smile: