OpenAPI-Specification icon indicating copy to clipboard operation
OpenAPI-Specification copied to clipboard

Support for structured-headers de/serialization

Open ioggstream opened this issue 6 years ago • 9 comments

I expect

A way to express structured-fields serialization rfc8941

  • https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html

Here are some examples:

Example-IntegerHeader: 42
Example-BoolHdr: ?1
Example-StringHeader: "hello world"
Example-BinaryHdr: :cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:
Example-StrListHeader: "foo", "bar", "It was the best of times."
Example-DictHeader: en="Applepie", da=*w4ZibGV0w6ZydGU=*

Note

In the near future, all http headers will probably be de/serialized using structured-header specs.

ioggstream avatar Jul 19 '19 16:07 ioggstream

@ioggstream JSON Schema is defined over a data model, so as long as the structured header format can be unambiguously parsed into that data model, it would make sense to just use JSON Schema for that.

@darrelmiller @webron is this something we should note or clarify for 3.0.3 and/or 3.1? I'm going to flag this under #2099 even though its pretty tangential to the JSON Schema draft update. It is related to JSON Schema stuff that we have tried to make more explicit in recent drafts.

handrews avatar Jan 21 '20 01:01 handrews

Can define structured-headers as an alternative schema help?

ioggstream avatar Jan 21 '20 11:01 ioggstream

It might be worth introducing a new style value called structured-header or something like that in the future. The Schema object can describe the header value content and the style will clarify how it should be serialized. I am still not seeing very many uses of structured headers so I don't think there is an urgency. It is worth considering for 3.2.

darrelmiller avatar Jan 21 '20 13:01 darrelmiller

structured-headers is still WIP, so 3.2 is fine.

OTOH it could be interesting some feedback from the OAS community to https://github.com/httpwg/http-extensions/blob/master/draft-ietf-httpbis-header-structure.md

ioggstream avatar Jan 21 '20 14:01 ioggstream

I expect

A way to express structured-headers serialization

  • https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html

Here are some examples:


Example-IntegerHeader: 42

Example-BoolHdr: ?1

Example-StringHeader: "hello world"

Example-BinaryHdr: :cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:

Example-StrListHeader: "foo", "bar", "It was the best of times."

Example-DictHeader: en="Applepie", da=*w4ZibGV0w6ZydGU=*



Note

In the near future, all http headers will probably be de/serialized using structured-header specs.

Budda0ne avatar Jan 23 '21 16:01 Budda0ne

Structured fields is now RFC 8941

ioggstream avatar Oct 26 '21 06:10 ioggstream