Skip to content
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

Support for structured-headers de/serialization #1980

Open
ioggstream opened this issue Jul 19, 2019 · 6 comments
Open

Support for structured-headers de/serialization #1980

ioggstream opened this issue Jul 19, 2019 · 6 comments
Labels
headers param serialization Issues related to parameter and/or header serialization

Comments

@ioggstream
Copy link
Contributor

ioggstream commented Jul 19, 2019

I expect

A way to express structured-fields serialization rfc8941

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.

@handrews
Copy link
Member

@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.

@ioggstream
Copy link
Contributor Author

Can define structured-headers as an alternative schema help?

@darrelmiller
Copy link
Member

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.

@ioggstream
Copy link
Contributor Author

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

@Budda0ne

This comment has been minimized.

@ioggstream
Copy link
Contributor Author

Structured fields is now RFC 8941

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
headers param serialization Issues related to parameter and/or header serialization
Projects
Status: No status
Development

No branches or pull requests

5 participants
@darrelmiller @ioggstream @handrews @Budda0ne and others